编写Json以提供thingspeak中的特定值
我想要一个Json格式,这样它只会显示来自提要的数据。但是,Json:编写Json以提供thingspeak中的特定值,json,api,Json,Api,我想要一个Json格式,这样它只会显示来自提要的数据。但是,Json: https://api.thingspeak.com/channels/1156780/feeds.json?results=2 告诉我结果 { "channel": { "id": 1156780, "name": "Test", "description": &qu
https://api.thingspeak.com/channels/1156780/feeds.json?results=2
告诉我结果
{
"channel": {
"id": 1156780,
"name": "Test",
"description": "testing channel",
"latitude": "0.0",
"longitude": "0.0",
"field1": "Field Label 1",
"created_at": "2020-09-24T07:38:51.0000000Z",
"updated_at": "2020-10-08T14:35:27.0000000Z",
"last_entry_id": 3
},
"feeds": [
{
"created_at": "2019-12-02T08:23:56.0000000Z",
"entry_id": 2,
"field1": "1.1"
},
{
"created_at": "2020-05-15T20:03:48.0000000Z",
"entry_id": 3,
"field1": "1.11"
}
]
}
我不需要channel对象,只需要feeds对象。
我已经尝试过写这个Json:
https://api.thingspeak.com/channels/1156780/feeds/last.json?results=3
但这只给出了输入的最后一个字段的结果
{"created_at":"2017-05-15T20:03:42Z","entry_id":1,"field1":"1"}
有没有一种方法可以在没有通道对象的情况下查看所有field1?feed是否必须在一个数组中(因为feed中有条目)