I am using a php file to connect to my Cloudant database and retrieve a specific Json document. The connection is ok but how can I run this query in the php file to get back the results ? I already tested the query on the Cloudant Dashbord and I can visualize the results
{
"selector": {
"datetime": {
"$gt": 0
}
},
"fields": [
"_id",
"_rev",
"status",
"datetime",
"temperature",
"humidity",
"sunintesity"
],
"sort": [
{
"datetime": "desc"
}
],
"limit" : 1
}