AnsweredAssumed Answered

I want to add 4 fields to repeating array element with same 4 fields of JSON profile

Question asked by onkar.kurkute720024 on Oct 25, 2016
Latest reply on Oct 27, 2016 by onkar.kurkute720024

I have json profile data as this

{
"id": "asd",
"type": "asd",
"action": "ads",
"retryErrorCount": 1,
"errors": [
{
"httpStatus": 500,
"message": "server",
"source": "f1",
"timestamp": "2016-01-01 22:00:01"
}

]

}

 and when next time I encounter a error I want to add this new error to previous data

So if new error message is as 

{
"httpStatus": 422,
"message": "missing",
"source": "f2",
"timestamp": "2016-01-02 08:00:00"
}

 

I want to add them so final data will be as

 

{
"id": "asd",
"type": "asd",
"action": "ads",
"retryErrorCount": 2,
"errors": [
{
"httpStatus": 500,
"message": "server",
"source": "f1",
"timestamp": "2016-01-01 22:00:01"
},
{
"httpStatus": 422,
"message": "missing",
"source": "f2",
"timestamp": "2016-01-02 08:00:00"
}
]
}

Outcomes