<?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: How to create a kvpair from two automatically extracted JSON arrays? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-kvpair-from-two-automatically-extracted-JSON/m-p/600380#M208994</link>
    <description>&lt;P&gt;Hi, hopefully I understood your question correctly.&amp;nbsp; Can you try this out and see if it's doing what you want it to do?&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval json="{ \"stuff\":[{\"name\": \"name0\", \"value\": \"value0\"},{\"name\": \"name1\", \"value\": \"value1\"}] }"&lt;BR /&gt;| spath input=json&lt;BR /&gt;| eval fieldName=mvindex('stuff{}.name',1),&lt;BR /&gt;value=mvindex('stuff{}.value',1),&lt;BR /&gt;{fieldName}=value&lt;BR /&gt;| table *&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jun 2022 04:55:40 GMT</pubDate>
    <dc:creator>rymundo_splunk</dc:creator>
    <dc:date>2022-06-03T04:55:40Z</dc:date>
    <item>
      <title>How to create a kvpair from two automatically extracted JSON arrays?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-kvpair-from-two-automatically-extracted-JSON/m-p/600359#M208985</link>
      <description>&lt;P&gt;I'm in a situation where by sourcetype, I'm already having a nested JSON array broken into 2 fields: DeviceProperties{}.Name and DeviceProperties{}.Value&amp;nbsp; there are 16 elements in each array.&lt;BR /&gt;&lt;BR /&gt;I'm trying to simply create a field name that is the value of the second element in DeviceProperties{}.Name and the Value is the value of the second element in DeviceProperties{}.Value.&amp;nbsp; In this scenario I think I can get away with just creating a field with just DeviceProperties{1}.Value but I haven't been successful in doing that.&lt;BR /&gt;&lt;BR /&gt;I've tried using the json_extract function, but I think I am getting the syntax wrong, and I havent found any examples yet that are trying to do this exact scenario where the json array was already created as a multivalue field.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 22:57:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-kvpair-from-two-automatically-extracted-JSON/m-p/600359#M208985</guid>
      <dc:creator>mjones414</dc:creator>
      <dc:date>2022-06-02T22:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a kvpair from two automatically extracted JSON arrays?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-kvpair-from-two-automatically-extracted-JSON/m-p/600380#M208994</link>
      <description>&lt;P&gt;Hi, hopefully I understood your question correctly.&amp;nbsp; Can you try this out and see if it's doing what you want it to do?&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval json="{ \"stuff\":[{\"name\": \"name0\", \"value\": \"value0\"},{\"name\": \"name1\", \"value\": \"value1\"}] }"&lt;BR /&gt;| spath input=json&lt;BR /&gt;| eval fieldName=mvindex('stuff{}.name',1),&lt;BR /&gt;value=mvindex('stuff{}.value',1),&lt;BR /&gt;{fieldName}=value&lt;BR /&gt;| table *&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 04:55:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-kvpair-from-two-automatically-extracted-JSON/m-p/600380#M208994</guid>
      <dc:creator>rymundo_splunk</dc:creator>
      <dc:date>2022-06-03T04:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a kvpair from two automatically extracted JSON arrays?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-kvpair-from-two-automatically-extracted-JSON/m-p/600707#M209101</link>
      <description>&lt;P&gt;You are legendarily awesome in my week this week!&amp;nbsp; Thank you!&amp;nbsp; If you're gonna be at .conf2022, I'd love to buy you a drink to show my appreciation.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 14:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-kvpair-from-two-automatically-extracted-JSON/m-p/600707#M209101</guid>
      <dc:creator>mjones414</dc:creator>
      <dc:date>2022-06-06T14:32:16Z</dc:date>
    </item>
  </channel>
</rss>

