<?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>topic Re: Why am I encountering a bug when accessing nested JSON field values? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-encountering-a-bug-when-accessing-nested-JSON-field/m-p/414396#M73296</link>
    <description>&lt;P&gt;I think the correct syntax for your second search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=cmdb | eval ip='data.ip_v4'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The requirement for single quotes in this situation is stated at &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Eval&lt;/A&gt; under Syntax:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;If the expression references a field name that contains non-alphanumeric characters, it needs to be surrounded by single quotation marks.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Fri, 29 Jun 2018 19:30:10 GMT</pubDate>
    <dc:creator>jtacy</dc:creator>
    <dc:date>2018-06-29T19:30:10Z</dc:date>
    <item>
      <title>Why am I encountering a bug when accessing nested JSON field values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-encountering-a-bug-when-accessing-nested-JSON-field/m-p/414395#M73295</link>
      <description>&lt;P&gt;There seems to be a bug searching events with JSON data if the field names are nested.&lt;/P&gt;

&lt;P&gt;For example:  &lt;CODE&gt;sourcetype=cmdb | rename data.ip_v4_address AS ip&lt;/CODE&gt;&lt;BR /&gt;
This search works as expected&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=cmdb | eval ip=data.ip_v4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search does not put any value in the ip field.&lt;/P&gt;

&lt;P&gt;If, however, I create an alias for data.ip_v4, I can use eval to access the value of the aliased field.&lt;/P&gt;

&lt;P&gt;I complained to my Splunk SE about this over a year ago and it still hasn't been fixed as of 7.1.1.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 18:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-encountering-a-bug-when-accessing-nested-JSON-field/m-p/414395#M73295</guid>
      <dc:creator>responsys_cm</dc:creator>
      <dc:date>2018-06-29T18:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I encountering a bug when accessing nested JSON field values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-encountering-a-bug-when-accessing-nested-JSON-field/m-p/414396#M73296</link>
      <description>&lt;P&gt;I think the correct syntax for your second search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=cmdb | eval ip='data.ip_v4'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The requirement for single quotes in this situation is stated at &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Eval&lt;/A&gt; under Syntax:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;If the expression references a field name that contains non-alphanumeric characters, it needs to be surrounded by single quotation marks.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 29 Jun 2018 19:30:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-encountering-a-bug-when-accessing-nested-JSON-field/m-p/414396#M73296</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2018-06-29T19:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I encountering a bug when accessing nested JSON field values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-encountering-a-bug-when-accessing-nested-JSON-field/m-p/414397#M73297</link>
      <description>&lt;P&gt;Boom!  Thanks, jtacy!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 19:32:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-encountering-a-bug-when-accessing-nested-JSON-field/m-p/414397#M73297</guid>
      <dc:creator>responsys_cm</dc:creator>
      <dc:date>2018-06-29T19:32:23Z</dc:date>
    </item>
  </channel>
</rss>

