I am running the following data method to get the company details of a given ticket.
CompanyData1 = JSON.stringify(data);
// failure operation
Basically, this returns all the company details of the ticket. The retrieved payload can be seen as below:
I want to retrieve a specific attribute once I retrieve the data. Is this feasible?
can you please explain a bit clearer?
are you trying to retrieve a value from the value which you received? if so yes, you can traverse through the object.
Hi @Santhosh -
That is correct. I am trying to compare an attribute with a value. Basically, with the given Sample data the above, I want to execute the following:
if (data.business_type = "XXXXX")
However, I tried to run a console.log(data.id) inside my function to test this out but it said ‘undefined’.
do you want to retrieve the company id or the avatar id (as in your snippet, only the latter is shown).
If your goal is the company id (which is not shown in your snippet), it actually should work with:
Thank you so much! This works!!
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.