Iterator Module Not Fully Iterating | Community
Skip to main content
November 16, 2023
Question

Iterator Module Not Fully Iterating

  • November 16, 2023
  • 1 reply
  • 1393 views

Hi Everyone!


We are running into an issue when trying to parse data that comes from an HTTP GET request. As you can see in the first picture below we are parsing the "data" header that was retrieved from the HTTP request. Then we take that parsed JSON data and iterate the "rows" of the JSON to get all of the values returned to us in a way that can be used later on in the scenario. But for some reason the iterator only returns one of array indexes.

Any help on getting all of the array indexes would be greatly appreciated.

 

Thanks in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

ChrisStephens
Community Advisor
Community Advisor
November 16, 2023

Data is not being interpreted as an iterable object by Fusion. Can you post an obfuscated example of what's in Data?

November 16, 2023

Hi Chris thanks for the reply,

 

Here is what data looks like. I hid most of the actual data and replaced the datasourceID with DATASOURCE

"data": "{\"datasource\":\"DATASOURCE\",\"columns\":[\"AD.surname\",\"AD.givenname\",\"allLowerEmail\",\"AD.title\",\"AD.Supervisor Full Name\",\"AD.FederationID\"],\"metadata\":[{\"type\":\"STRING\",\"dataSourceId\":\"DATASOURCE\",\"maxLength\":-1,\"minLength\":-1,\"periodIndex\":0,\"aggregated\":false},{\"type\":\"STRING\",\"dataSourceId\":\"DATASOURCE\",\"maxLength\":-1,\"minLength\":-1,\"periodIndex\":0,\"aggregated\":false},{\"type\":\"STRING\",\"dataSourceId\":\"DATASOURCE\",\"maxLength\":-1,\"minLength\":-1,\"periodIndex\":0,\"aggregated\":false},{\"type\":\"STRING\",\"dataSourceId\":\"DATASOURCE\",\"maxLength\":-1,\"minLength\":-1,\"periodIndex\":0,\"aggregated\":false},{\"type\":\"STRING\",\"dataSourceId\":\"DATASOURCE\",\"maxLength\":-1,\"minLength\":-1,\"periodIndex\":0,\"aggregated\":false},{\"type\":\"STRING\",\"dataSourceId\":\"DATASOURCE\",\"maxLength\":-1,\"minLength\":-1,\"periodIndex\":0,\"aggregated\":false}],\"rows\":[[\"surname\",\"givenname\",\"allLowerEmail\",\"title\",\"Supervisor Full\",\"Federation ID\"]],\"numRows\":1,\"numColumns\":6,\"fromcache\":true}",

 

ChrisStephens
Community Advisor
Community Advisor
November 16, 2023

Ok, so it looks like you're array is contained in data[columns], is that correct? If so, that's what you need to map into your iterator, get({{data}};columns).