<?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 Spath for getting date json field in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Spath-for-getting-date-json-field/m-p/483372#M82804</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm trying to use spath to extract JSON data from a field name that represents a date:&lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
    "field1": {&lt;BR /&gt;
        "2019-01-02": []&lt;BR /&gt;
    }&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;but when I try &lt;STRONG&gt;spath input=message output=result field1.2019-01-02&lt;/STRONG&gt; it's not working. I tried to replace the field name with another text (i.e. replace "2019-02-01" with "targetDate") and setting the replaced result in the spath input parameter but it is still not working.&lt;/P&gt;

&lt;P&gt;Thank you for your help. &lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2019 14:23:48 GMT</pubDate>
    <dc:creator>splkdylb</dc:creator>
    <dc:date>2019-11-14T14:23:48Z</dc:date>
    <item>
      <title>Spath for getting date json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Spath-for-getting-date-json-field/m-p/483372#M82804</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm trying to use spath to extract JSON data from a field name that represents a date:&lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
    "field1": {&lt;BR /&gt;
        "2019-01-02": []&lt;BR /&gt;
    }&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;but when I try &lt;STRONG&gt;spath input=message output=result field1.2019-01-02&lt;/STRONG&gt; it's not working. I tried to replace the field name with another text (i.e. replace "2019-02-01" with "targetDate") and setting the replaced result in the spath input parameter but it is still not working.&lt;/P&gt;

&lt;P&gt;Thank you for your help. &lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 14:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Spath-for-getting-date-json-field/m-p/483372#M82804</guid>
      <dc:creator>splkdylb</dc:creator>
      <dc:date>2019-11-14T14:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Spath for getting date json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Spath-for-getting-date-json-field/m-p/483373#M82805</link>
      <description>&lt;P&gt;Show us an entire raw event.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 01:22:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Spath-for-getting-date-json-field/m-p/483373#M82805</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-15T01:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Spath for getting date json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Spath-for-getting-date-json-field/m-p/483374#M82806</link>
      <description>&lt;P&gt;Try this SPL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval message="{\"foo\":{\"2019-01-02\":[{\"zoo\":1},{\"baz\":2}]}}" 
| spath input=message output=result path=foo.2019-01-02{}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2019 02:59:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Spath-for-getting-date-json-field/m-p/483374#M82806</guid>
      <dc:creator>anantcd</dc:creator>
      <dc:date>2019-11-15T02:59:48Z</dc:date>
    </item>
  </channel>
</rss>

