# Convert Recipe Ingredients to JSON

**Use case:** 

Break recipe ingredient lines into JSON with amount, unit and item so meal apps and shopping lists stay consistent.

## Input

```json
{
  "texts": [
    "2 cups flour",
    "1 tablespoon olive oil",
    "200 grams dark chocolate"
  ],
  "schema": {
    "amount": "",
    "unit": "",
    "item": ""
  },
  "maxItems": 3
}
```

## Output

```json
{
  "_sourceIndex": {
    "label": "Source index",
    "format": "number"
  },
  "name": {
    "label": "Name",
    "format": "text"
  },
  "price": {
    "label": "Price",
    "format": "text"
  },
  "date": {
    "label": "Date",
    "format": "text"
  },
  "truncated": {
    "label": "Truncated",
    "format": "boolean"
  },
  "observedAt": {
    "label": "Converted at",
    "format": "text"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [Tool: Any Text to Structured JSON](https://apify.com/scrapers_lat/text-to-json-tool) with a specific input configuration. Visit the [Actor detail page](https://apify.com/scrapers_lat/text-to-json-tool) to learn more, explore other use cases, and run it yourself.