Assigning JSON GET response field values to blueprint variables
After going through all the entries on this thread I’ve seen several people ask about parsing the response from a GET call back into variables, but don’t see any clear answers. I do a GET on my server and receive a response back of the form
{“ItemsMap”:{“ItemId”:“TankBInput”,“AccessRight”:“2”,“ItemType”:“2”},{“ItemId”:“FloatSwitch”,“AccessRight”:“0”,“ItemType”:“0”}]}
I want to extract the value of ItemId from the first entry of the ItemsMap array. I can’t figure out the proper collection of boxes to do so. Is there an example that illustrates this in Blueprint or C++? I figured I just needed to do a Get Response Object in response to an OnComplete event, set that to a Json Buffer, and then Get Object Array Field with ItemsMap as the field name, but can’t figure out the proper function to extract the first item of the array to get to the ItemId field. The image show’s what I’ve got in blueprint for the decomposition so far. I’m new to blueprint, so a lot of this blueprint programming is hit and miss.
Can somebody explain how I’d complete this assignment? I also wonder if this wouldn’t be easier in C++, but I don’t see any examples of VaRest that are C++ based. Any pointers are appreciated.