<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How do we solve this? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-do-we-solve-this/m-p/325475#M229643</link>
    <description>&lt;P&gt;I think the problem is that you are trying to evaluate path on a list of sensors:&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;sensor":[{"sensor_id":"Data05_37_alarm","value ":"0"},{"sensor_id":"Data06_37_alarm","value":"0"}&lt;/FONT&gt;....&lt;/P&gt;&lt;P&gt;you probably need to flatten json first and if you are trying to get each sensor information then you need to do splitjson and then you can do evaluatejsonpath. Hope that helps.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 03:02:48 GMT</pubDate>
    <dc:creator>SAMSAL</dc:creator>
    <dc:date>2021-09-28T03:02:48Z</dc:date>
    <item>
      <title>How do we solve this?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-we-solve-this/m-p/325470#M229641</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class="src grammarSection"&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;从MQTT接收到的数据，要读入json数组&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;LI-SPOILER&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"device_name":"Device37","device_id":"GanghuaLianXian","date":"2021-09-24 17:45:44","sensor":[{"sensor_id":"Data05_37_alarm","value ":"0"},{"sensor_id":"Data06_37_alarm","value":"0"},{"sensor_id":"Data07_37_alarm","value":"0"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data08_37_alarm ","value":"0"},{"sensor_id":"Data09_37_alarm","value":"0"},{"sensor_id":"Data10_37_alarm","value":"0"},{"sensor_id ":"Data11_37_alarm","value":"0"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data12_37_alarm","value":"0"},{"sensor_id":"Data13_37_alarm","value":"0"},{"sensor_id":"Data14_37_alarm","value":"0"},{"sensor_id":"Data15_37_alarm", "value":"0"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data16_37_alarm","value":"0"},{"sensor_id":"Data17_37_alarm","value":"0"},{"sensor_id": " Data18_37_alarm","value":"0"},{"sensor_id":"Data19_37_alarm","value":"0"},"0"},Data15_37_alarm","value":"0"}, &lt;/FONT&gt;&lt;FONT&gt;{"sensor_id":"Data16_37_alarm","value":"0"},{"sensor_id":"Data17_37_alarm","value":"0"},{" sensor_id":"Data18_37_alarm","value":"0"},{"sensor_id":"Data19_37_alarm","value":"0"},"0"},Data15_37_alarm","value":"0"}, &lt;/FONT&gt;&lt;FONT&gt;{"sensor_id":"Data16_37_alarm","value":"0"},{"sensor_id":"Data17_37_alarm","value":"0"},{" sensor_id":"Data18_37_alarm","value":"0"},{"sensor_id":"Data19_37_alarm","value":"0"},"0"},&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data16_37_alarm","value":"0"},{"sensor_id":"Data17_37_alarm","value":"0"},{"sensor_id":"Data18_37_alarm", "value":" 0"},{"sensor_id":"Data19_37_alarm","value":"0"},"0"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data16_37_alarm","value":"0"},{"sensor_id": "Data17_37_alarm","value":"0"},{"sensor_id":"Data18_37_alarm", "value":"0"},{"sensor_id":"Data19_37_alarm","value":"0"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{ "sensor_id":"Data20_37_alarm","value":"0"},{"sensor_id":"Data21_37_alarm","value":"0"},{"sensor_id":"Data22_37_alarm","value":"0"},{"sensor_id":"Data23_37_alarm","value":"0"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id": "Data24_37_alarm","value":"0"},{"sensor_id":"Data25_37_alarm","value":"0"},{"sensor_id":"Data26_37_alarm","value":"1"},{ "sensor_id":"Data27_37","value":"1"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data28_37","value":"0"},sensor_id":"Data24_37_alarm","value":"0"},{"sensor_id":"Data25_37_alarm","value":"0"},{"sensor_id":"Data26_37_alarm","value":"1" },{"sensor_id":"Data27_37","value":"1"}, &lt;/FONT&gt;&lt;FONT&gt;{"sensor_id":"Data28_37","value":"0"},sensor_id":"Data24_37_alarm","value":"0"},{"sensor_id":"Data25_37_alarm","value":"0"},{"sensor_id":"Data26_37_alarm","value":"1" },{"sensor_id":"Data27_37","value":"1"}, &lt;/FONT&gt;&lt;FONT&gt;{"sensor_id":"Data28_37","value":"0"},&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data29_37","value":"0"},{"sensor_id":"Data30_37_alarm","value":"0"},{"sensor_id":"Data31_37_state","value":" 0"}, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;{"sensor_id":"Data32_37_state"," value":"1"},{"sensor_id":"Data01_37_count","value":"9776"},{"sensor_id":"Data02_37_count"," value":"9777"}], &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;"状态"：1 }Data02_37_count","value":" 9777"}], &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;"状态"：1}Data02_37_count","value":" 9777"}], &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;"状态" ：1}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI-SPOILER&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class="src grammarSection"&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;EvaluateJsonPath 如何获取JSON数组&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class="src grammarSection"&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;我正在使用 EvaluateJsonPath 并且无法读取传感器数据&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cn-programmer_0-1632796511690.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/32453iF033F434464A43D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cn-programmer_0-1632796511690.png" alt="cn-programmer_0-1632796511690.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;error&lt;/LI&gt;&lt;/UL&gt;&lt;P class="src grammarSection"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cn-programmer_0-1632796668404.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/32454iFAAB5D1D43D8B828/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cn-programmer_0-1632796668404.png" alt="cn-programmer_0-1632796668404.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 02:38:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-we-solve-this/m-p/325470#M229641</guid>
      <dc:creator>cn-programmer</dc:creator>
      <dc:date>2021-09-28T02:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do we solve this?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-we-solve-this/m-p/325475#M229643</link>
      <description>&lt;P&gt;I think the problem is that you are trying to evaluate path on a list of sensors:&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;sensor":[{"sensor_id":"Data05_37_alarm","value ":"0"},{"sensor_id":"Data06_37_alarm","value":"0"}&lt;/FONT&gt;....&lt;/P&gt;&lt;P&gt;you probably need to flatten json first and if you are trying to get each sensor information then you need to do splitjson and then you can do evaluatejsonpath. Hope that helps.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 03:02:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-we-solve-this/m-p/325475#M229643</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2021-09-28T03:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do we solve this?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-we-solve-this/m-p/325477#M229644</link>
      <description>&lt;P class="lia-align-left"&gt;First of all, thank you for your reply. I will try your method&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 03:23:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-we-solve-this/m-p/325477#M229644</guid>
      <dc:creator>cn-programmer</dc:creator>
      <dc:date>2021-09-28T03:23:52Z</dc:date>
    </item>
  </channel>
</rss>

