Stack Exchange
How to query an account to get only single object in quickbooks?
I am calling this function to get the accounts details with particular Name
  const getAccount = async ({ realmId, auth }) => {
    const postBody = {
      url: `https://sandbox-quickbooks.api.intuit.com/v3/company/${realmId}/query?query=select * from Account where Name='Sales of Product Income'`,
      headers: {
        Accept: "application/json",
        "Content-Type": "application/x-www-form-urlencoded",
        Authorization: "Bearer " + auth
      }
    };
    const data = await rp.get(postBody);
    return JSON.parse(data);
  };

However it is giving me data in an array
{
  Account: [
    {
      Name: 'Sales of Product Income',
      SubAccount: false,
      FullyQualifiedName: 'Sales of Product Income',
      Active: true,
      Classification: 'Revenue',
      AccountType: 'Income',
      AccountSubType: 'SalesOfProductIncome',
      CurrentBalance: 0,
      CurrentBalanceWithSubAccounts: 0,
      CurrencyRef: [Object],
      domain: 'QBO',
      sparse: false,
      Id: '79',
      SyncToken: '0',
      MetaData: [Object]
    }
  ],
  startPosition: 1,
  maxResults: 1
}

So I need to know is there any api to get single object instead of array in quickbooks or can I pass some parameter to get object?

This question is quite specific for quickbooks api. I never use this API before, but following the document, they provide filter data query like SQL
So, I think you can use a same api and change query. Something like SELECT * FROM your_table WHERE id = your_book_id
