I'm working with this kind of Json in Scala :
{
"ClientBase": [
{
"string#name": "robert",
"int#age": 46,
"string#country": "USA"
},
{
"string#name": "tom",
"int#age": 45,
"string#country": "UK"
}
]
}
I use Json4s library and I would like to add a new field to each client. I know how do this for one but is there a quick way to do this for every one ?
I would like a result like this :
{
"ClientBase": [
{
"string#name": "robert",
"int#age": 46,
"string#country": "USA",
"BLOCK_ID" : "client_base"
},
{
"string#name": "tom",
"int#age": 45,
"string#country": "UK",
"BLOCK_ID" : "client_base"
}
]
}