这是我在运行以下 2 个命令后得到的输出。
Wc = os:cmd("curl -s -k -X GET 'http://10.210.12.158:10065/iot/get/task_id?id=1'"),
WW = decode_json(Wc),
输出 - -
{ok,{obj,[{"status",200},
{"data",
[{obj,[{"id",1},
{"task",
<<"Turn on the bulb when the temperature is greater than 28 ">>},
{"working_condition",1},
{"depending_value",<<"Temperature">>},
{"device",<<" BulbOnly">>},
{"turning_point",28},
{"config_id",null}]}]}]}}
我想分别获取这些数据。
例如 - 任务 = 当温度大于 28 时打开灯泡
那么,我该怎么做呢?