dev-cloudjunctio
Level 1

Inquiry about retrieving specific fields from nested object.

Hi,

If we have multiple objects in the JSON, how can we query specific fields from each nested object?

For example, suppose I only want to retrieve certain fields from the nested Line object of an Invoice. How can I achieve this through a Query?

"Invoice": [
  {
    "sparse": true,
    "Id": "157",
    "DocNumber": "1042",
    "TxnDate": "2025-07-21",
    "CurrencyRef": {
      "value": "USD",
      "name": "United States Dollar"
    },
    "Line": [
      {
        "Id": "1",
        "LineNum": 1,
        "Description": "Opening Balance",
        "Amount": 275.00,
        "DetailType": "SalesItemLineDetail"
      }
    ]
  }
]


Currently, when I try to include the Amount field from the Line object using projection (e.g., Line.Amount), I receive a null response. 

Thanks,

EduardA
QuickBooks Team

Other questions

Let me connect you with the right team that can assist you with programming-related questions, @dev-cloudjunctio.

 

I highly recommend reaching out to the Intuit Developer Community, where supports can give you advice on how to properly write queries to extract specific data fields. Here's how you can do that:

  1. Go to the Intuit Developer Support website.
  2. Select your QuickBooks product.
  3. Click on Ask a Question.
  4. When prompted to sign in, log in to your Intuit account.
  5. Enter a brief description of your concern and click Ask.

Feel free to come back anytime to this thread if you need more help with QuickBooks.