Input:
[
{
"name": "vedhh"
},
{
"name": "guru"
}
]
Expected Output:
{
"Registered_Names" : [ "vedhh", "guru" ]
}
The spec I'm currently using now is mentioned below. It takes both keys and values and I want to only take a list of values and make it an array of strings. Spec:
[
{
"operation": "shift",
"spec": {
"*": "Registered_Names[]"
}
}
]
Just dive one level deeper in order only to extract the values, but not the key names so as to form the desired array such as
[
{
"operation": "shift",
"spec": {
"*": {
"*": "Registered_Names[]"
}
}
}
]