Hi, I am trying to use a function to access an outside defined ML model based on IBM. The requested format is specified as
-d '{"input_data": [{"fields": ["SENSOROUTPUTSTATUS", "TEMP", "HUMIDITY", "TIME"],"values": [$ARRAY_OF_VALUES_TO_BE_SCORED]}]}'
I am unsure how to define the "input_data" in the function. So far I've attempted the following:
msg.payload={};
msg.payload['fields']=["SENSOROUTPUTSTATUS", "TEMP", "HUMIDITY", "TIME"];
msg.payload['values']=[[US_SENSORSTATUS,TEMPERATURE,hum,READINGTIME]];
msg.payload['input_data']=[msg.payload['fields'],msg.payload['values']];
But I receive the following error "Scoring payload field 'input_data' is not in valid format. Excepted format is Json Array". How can I fix this? Thanks for any help