cancel
Showing results for 
Search instead for 
Did you mean: 

access data after using the JSON to Collection action

ZahibSidiq
Level 4
Hello,  I collected a json file into collection using json vbo, what i have inside the collection now is "Row 1 of 3" and when i click on it it unfolds into three lines: Row 1 of 1 Row 1 of 1 Row 1 of 1   could anyone guide through how I access the data in the collection after using the JSON to Collection action.  BR   Zahib 
4 REPLIES 4

david.l.morris
Level 15
The JSON VBO assumes you have the JSON data in a Text Data Item in BP already. So, first use some method to get the text into a text data item (perhaps using the in-built function in a Calculation stage 'LoadTextFile(Filename)' or using the VBO 'Utility - File Management'). Then use that text data item as input to one of the JSON to Collection actions in the JSON VBO.

Dave Morris, 3Ci at Southern Company

ZahibSidiq
Level 4
Thank you David. I found out of it a few moments ago, but now i am facing a new issue (edited the original post). Any tips? 

david.l.morris
Level 15
If the structure of the JSON is static, then you can sort of unpack it by setting up a series of stages that take the nested collections out and put them into their own top-level collections. 1. Convert JSON to Collection 2. Use a Calc stage with the expression of '[MainCollection.SubCollection]' and store the result into [AnotherCollection]. 3. Then use the value of the resulting collection like '[AnotherCollection.Field1]' You're supposed to be able to reference it like this: [MainCollection.SubCollection.Field1] but I haven't found that to work as I would expect. That's why I always take the subcollections out before working with them. However, I'd suggest you try both methods and see what works, based on your Blue Prism version.

Dave Morris, 3Ci at Southern Company

ZahibSidiq
Level 4
Thank you one again, giving it a try now :)Â