# Convert Invoice Lines to JSON

**Use case:** 

Extract product, quantity, unit price and total from an invoice line into structured JSON for faster bookkeeping.

## Input

```json
{
  "texts": [
    "3x Wireless Mouse @ $19.99 each, subtotal $59.97"
  ],
  "schema": {
    "product": "",
    "quantity": "",
    "unitPrice": "",
    "total": ""
  }
}
```

## 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.