{"id":68313,"date":"2022-12-14T13:12:53","date_gmt":"2022-12-14T13:12:53","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=68313"},"modified":"2022-12-14T13:12:53","modified_gmt":"2022-12-14T13:12:53","slug":"answer-by-warren-for-how-to-extract-values-from-json-array-and-validate-in-splunk","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=68313","title":{"rendered":"Answer by warren for How to extract values from json array and validate in Splunk"},"content":{"rendered":"<p>You don&#8217;t need to loop through the values, you need to treat them as multivalue fields, and expand\/filter appropriately<\/p>\n<p>For example:<\/p>\n<pre><code>index=ndx sourcetype=srctp fieldname.subname{}.value=*\n| rename fieldname.subname{}.value as subname\n| mvexpand subname\n| stats count by subname\n| fields - count\n<\/code><\/pre>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/74778740\/how-to-extract-values-from-json-array-and-validate-in-splunk\/74798777#74798777<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You don&#8217;t need to loop through the values, you need to treat them as multivalue fields, and expand\/filter appropriately For example: index=ndx sourcetype=srctp fieldname.subname{}.value=* | rename fieldname.subname{}.value as subname | mvexpand subname | stats count by subname | fields &#8211; count from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/74778740\/how-to-extract-values-from-json-array-and-validate-in-splunk\/74798777#74798777 via IFTTT<\/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-68313","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\/68313","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=68313"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/68313\/revisions"}],"predecessor-version":[{"id":68314,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/68313\/revisions\/68314"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68313"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=68313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}