0

I want to get the value of result.data (but it gives me null) can somebody explain me how targeting in the json below works. Do not understand it.

{
   "ActTime" : 1547809207,
   "AstrTwilightEnd" : "19:02",
   "AstrTwilightStart" : "06:37",
   "CivTwilightEnd" : "17:40",
   "CivTwilightStart" : "07:59",
   "DayLength" : "08:23",
   "NautTwilightEnd" : "18:22",
   "NautTwilightStart" : "07:17",
   "ServerTime" : "2019-01-18 12:00:07",
   "SunAtSouth" : "12:05",
   "Sunrise" : "08:38",
   "Sunset" : "17:01",
   "app_version" : "4.9700",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 18,
         "Data" : "On",
         "Description" : "",
         "DimmerType" : "none",
         "Favorite" : 0,
         "HardwareID" : 7,
         "HardwareName" : "Iphone Gert-Jan",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "000141F8",
         "Image" : "Phone",
         "IsSubDevice" : false,
         "LastUpdate" : "2019-01-18 11:49:18",
         "Level" : 0,
         "LevelInt" : 0,
         "MaxDimLevel" : 100,
         "Name" : "Iphone Gert-Jan",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "Selector Switch",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "Light/Switch",
         "TypeImg" : "lightbulb",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "424"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

[.result][][].data returns nothing

closed as off-topic by Christopher, Inian, Jeff Schaller, terdon Jan 18 at 17:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Christopher, Inian, Jeff Schaller, terdon
If this question can be reworded to fit the rules in the help center, please edit the question.

2

already figured it out.. I forgot case sensitive. used data instead of Data.

Not the answer you're looking for? Browse other questions tagged or ask your own question.