Json auslesen
Hab eine Get-Abfrage gemacht mit nachfolgender Antwort. "invoices" kann ich auslesen, "invoice_id" leider nicht. Liegt wohl an den eckigen Klammern. Kann mir da jemand weiterhelfen?
{
"invoices": [
{
"invoice_id": 107692521,
"invoice_reference_id": null,
"invoice_timestamp": "2020-03-14 03:37:04",
"invoice_number": 4509,
"invoice_numberFull": "RG2020/4509",
"invoice_total": 8,
"invoice_totalNet": 6.72,
"invoice_totalVat": 1.28,
"invoice_totalTip": 0,
"invoice_address_company": null,
"invoice_address_vatId": null,
"invoice_address_salutation": null,
"invoice_address_title": null,
"invoice_address_firstName": null,
"invoice_address_lastName": null,
"invoice_address_street": null,
"invoice_address_city": null,
"invoice_address_zip": null,
"invoice_address_country": null,
"invoice_address_email": null,
"invoice_address_phone": null,
"invoice_inPrinterQueue": false,
"invoice_priceBase": "brutto",
"invoice_deleted_at": null,
"invoice_deletedReason": null,
"invoice_pdf": null,
"invoice_text": null,
"invoice_textBeforeItemsTable": null,
"invoice_locked": true,
"invoice_externalReferenceNumber": null,
"invoice_internalInvoiceReferenceNumber": null,
"invoice_dueDate": null,
"invoice_deliveryDate": "2020-03-14 00:00:00",
"invoice_paid": true,
"invoice_paidDate": "2020-03-14 03:37:04",
"invoice_testMode": false,
"invoice_formatVersion": 2,
"customer_id": null,
"customerCategory_id": null,
"table_id": 1552623,
"tableArea_id": 122335,
"paymentMethod_id": 330522,
"user_id": 185931,
"printer_id": 168087,
"billType_id": 1,
"currency_id": 1,
"address": {
"company": null,
"vatId": null,
"salutation": null,
"title": null,
"firstName": null,
"lastName": null,
"street": null,
"city": null,
"zip": null,
"country": null,
"email": null,
"phone": null
},
"type": {
"billType_id": 1,
"billType_name": "Rechnung",
"billType_symbol": "RG"
},
"discounts": [],
"signature": [],
"dailyReport_number": 18,
"dailyReport_endDate": "2020-03-14 03:37:48",
"dailyReport_id": 16370120,
"dailyReport_startDate": "2020-03-13 20:48:42"
}
],
"count": 1,
"limit": 100,
"offset": 0,
"query": "RG2020/4509"
}
2 Antworten
-
Hallo,
Ich würde es so versuchen:
first(invoices).invoice_id
Leo
-
super vielen dank
Content aside
- vor 4 JahrenZuletzt aktiv
- 2Antworten
- 559Ansichten