Extract the title and author of a book from a string and output in JSON format
The Great Gatsby by F. Scott Fitzgerald
```json
{"title": "The Great Gatsby", "author": "F. Scott Fitzgerald"}
```
Complete the following task based on the instruction and optional input provided.### Instruction:
Extract the title and author of a book from a string and output in JSON format

### Input:
The Great Gatsby by F. Scott Fitzgerald

### Output:
```json
{"title": "The Great Gatsby", "author": "F. Scott Fitzgerald"}
```