I'm working with JSON objects in Architect and need clarification on 'SetJsonObjectProperty' functionality.
I have a simple JSON structure stored in a variable Flow.dataBus
{
"conversation": {
"active": {
"conversationId": "",
"flowStartDateTimeUtc": "",
"ani": "",
"dialledNumber": "",
"journeyHistory": []
},
"history": {}
},
"event": {}
}
My question: Does SetJsonObjectProperty support specifying a JSON path as the first argument? For example:
SetJsonObjectProperty(Flow.dataBus.conversation.active, "conversationId", Call.ConversationId)
This seems to validate but errors on runtime. Currently, I'm having to use a more verbose approach with nested GetJsonObjectProperty and SetJsonObjectProperty calls. GetJsonObjectProperty allows a path to be defined but I cannot resolve the issue on Set.
Is there a more elegant way to set values at specific paths within a complex JSON structure in Architect?
Thanks
Gordon