Skip to main content
Question

JSON Deserializer to Table issue

  • 27 June 2024
  • 3 replies
  • 25 views

When using JSON Deserializer to Table, AA puts the columns in the wrong order.

This AA Action doesn’t have any configuration properties so there’s no control over the column order. Why is this action putting the columns in this order?

3 replies

Userlevel 2
Badge +6

Ordering matters only in JSON Array not Object. Use keys/column name to parse JSON Object?

Userlevel 2
Badge +8

Ok but what is the logic in how that AA command works? It can’t be random, right? 

Userlevel 2
Badge +8

So here’s the situation, we are moving from using a static file in the control room to fetching data from a source using an API call which brings back this JSON. We have a lot of existing code that references this the table and specific column positions. We’re trying to avoid rework by putting the JSON Array in a specific order. Why have a “JSON Deserializer to table” action if it puts things in a random or inconsistent order?

We can certainly write a lot of code that loops through the JSON, finds the keys, and populates a table the way we want, but that’s way more work than just re-coding the lines to new column positions (or using column names instead).

 

Reply