Return values ​​in complex or nested JSON

Dear good afternoon,
I am contacting you to find out if there is any way to obtain the "descripcion_errores" value from a response like this:

Msant77s_0-1712012897014.png

I have tried to process this value in different ways, but I understand that according to the documentation, it is not yet possible to access that type of structure: https://support.google.com/appsheet/answer/12738438?hl=en
Since I have tried to access it in different ways and it was not possible, I was wondering if I can somehow save the entire response in a cell as longtext and then process it. When trying to do this, I mean save the value of "response" appsheet tells me that it doesn't recognize that value anyway.

Msant77s_1-1712013273022.png

I have seen in other answers that with AppScript I could do the entire process, however I want to exhaust the possibilities of being able to do it with return values ​​from the webhook, if possible I would greatly appreciate the help.

 

0 2 96
2 REPLIES 2

Hello there,

AppSheet is still working on improving the "return values" functionality, and this is something you can currently easily accomplish with google scripts, so I suggest you just switch for now.

On google scripts you can just create a function that returns any value* it is you want and give it to AppSheet so that it places it somewhere in your app.

*There are limitations as well (unless you're writing straight into the back-end) but there are workarounds for most issues you might find there

 

@Msant77s 

When dealing with complex or nested JSON structures, return values refer to the specific data elements or values extracted from the JSON object or array after processing or querying it.

In complex or nested JSON, data is often organized hierarchically, with objects containing other objects or arrays of objects. To access specific values within such structures, you typically need to navigate through the hierarchy using key-value pairs or array indices.

For example, consider the following nested JSON representing information about a person:

 

 

To retrieve specific return values from this JSON:

  1. Name: You would access the value associated with the "name" key, which is "John Doe".
  2. Age: Similarly, you would access the value associated with the "age" key, which is 30.
  3. Address: Since the "address" key contains nested objects, you would access its individual components like "street", "city", and "country".
  4. Emails: The "emails" key contains an array of email addresses, so you can access each email address individually by its index within the array.

In more complex scenarios, where JSON structures are deeply nested or contain arrays of objects with varying structures, accessing return values may require more intricate parsing and querying techniques. This might involve using loops, conditionals, or specialized JSON manipulation libraries depending on the programming language or environment being used.

Overall, understanding how to extract return values from complex or nested JSON structures is essential for effectively working with JSON data in software development, data analysis, and other domains where JSON is commonly used as a data interchange format.

For more guidence then click (URL Removed by Staff)

Top Labels in this Space