Input,
{"scores": [ 4,2,8,7,5 ] }
Output,
{"FirstElement": 2 } //This is generated by dividing the first element of the array by 2.
Spec,
[{
"operation": "modify-overwrite-beta",
"spec": {
"Avg": "=divide(=firstElement(@(1,scores)),2)"
}
}]
From the above Spec,I am trying to divide the first element of the list by 2 but the output I get is same as the input.