{"id":24769,"date":"2020-11-02T13:37:09","date_gmt":"2020-11-02T13:37:09","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=24769"},"modified":"2020-11-02T13:37:09","modified_gmt":"2020-11-02T13:37:09","slug":"answer-by-warren-for-splunk-duplicated-json-fields-on-searchhead","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=24769","title":{"rendered":"Answer by warren for SPLUNK : Duplicated json fields on searchHead"},"content":{"rendered":"<p>In all probability what you&#8217;re describing is a <em>multivalue field<\/em> inside the JSON blob, and not a &quot;duplicated&quot; field. Please share some sample data to verify.<\/p>\n<p>Are you seeing something like this in a <code>| table<\/code>?<\/p>\n<pre><code>FieldA | FieldB\n^^^^^^^^^^^^^^^\nBarA   | FooB\n       | FooM\n^^^^^^^^^^^^^^^\nBarB   | FooA\n       | FooG    \n<\/code><\/pre>\n<p>If so, then in your JSON blob there are multiple values being tucked inside one of the key-value &quot;pairs&quot;<\/p>\n<p>And you&#8217;ll want to <code>mvexpand<\/code> them to get a one-for-one mapping in your table thusly:<\/p>\n<pre><code>&lt;SPL before |table&gt;\n| mvexpand FieldB\n| table FieldA FieldB\n&lt;any other SPL you have&gt;\n<\/code><\/pre>\n<p>This will yield you a table like this:<\/p>\n<pre><code>FieldA | FieldB\n^^^^^^^^^^^^^^^\nBarA   | FooB\n^^^^^^^^^^^^^^^\nBarA   | FooM\n^^^^^^^^^^^^^^^\nBarB   | FooA\n^^^^^^^^^^^^^^^\nBarB   | FooG    \n<\/code><\/pre>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/64593739\/splunk-duplicated-json-fields-on-searchhead\/64646589#64646589<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In all probability what you&#8217;re describing is a multivalue field inside the JSON blob, and not a &quot;duplicated&quot; field. Please share some sample data to verify. Are you seeing something like this in a | table? FieldA | FieldB ^^^^^^^^^^^^^^^ BarA | FooB | FooM ^^^^^^^^^^^^^^^ BarB | FooA | FooG If so, then in &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=24769\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for SPLUNK : Duplicated json fields on searchHead<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[991],"keyring_services":[],"class_list":["post-24769","post","type-post","status-publish","format-standard","hentry","category-blih","tag-stackexchange"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/24769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24769"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/24769\/revisions"}],"predecessor-version":[{"id":24770,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/24769\/revisions\/24770"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24769"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=24769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}