Forum Discussion
akidave
5 years agoEmployee
There is an experimental API here. Given one or more input documents and the same number of desired output documents, the API tries to generate an expression that does the desired transformation.
In this case, change the input to
[
{
"washCare": [
"Machine Wash, WARM",
"Hand Wash Only"
]
}
]
and output to
[
{
"washCare": [
{
"instruction": "Machine Wash, WARM"
},
{
"instruction": "Hand Wash Only"
}
]
}
]
and click on Synthesize. The generated result is
{ washCare: $.washCare.map(elem => { instruction: elem }) }
Note: This is experimental right now and works for limited inputs only