How can I use karate.map to convert this:
{
"Test1": 10,
"Test2": 5
}
to this:
[
{
"key": "Test1",
"amount": 10
},
{
"key": "Test2",
"amount": 5
}
]
I tried the following, which did not work.
* def objectAsMap = karate.map(objects, ([token, amount]) => ({ token, amount }))