<?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 extract value from search response which has a text plus json? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655604#M226474</link>
    <description>&lt;P&gt;I have updated my response.&lt;/P&gt;&lt;P&gt;If it works, this is probably the easiest way to do it. Any other method is likely to be more complex.&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 08:50:58 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-08-25T08:50:58Z</dc:date>
    <item>
      <title>How to extract value from search response which has a text plus json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655538#M226448</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I am beginner with Splunk.&lt;BR /&gt;I made a query and my search result is like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;text1 text2 text3 response: {
   "status":"UP",
   "object1":{
      "field1":"name1",
      "status":"UP"
   },
   "object2":{
      "field2":"name2",
      "status":"UP"
   },
   "object3":{
      "object4":{
         "field4":"name4",
         "status":"UP"
      },
      "object5":{
         "field5":"name5",
         "status":"UP"
      },
      "status":"UP"
   },
   "object6":{
      "field6":"name6",
      "status":"UP"
   }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to obtain the value for object3.status for a column of table.&lt;BR /&gt;How to do this ?&lt;BR /&gt;With rex field=_raw or spath ?&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 19:15:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655538#M226448</guid>
      <dc:creator>aliosa</dc:creator>
      <dc:date>2023-08-24T19:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract value from search response which has a text plus json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655573#M226465</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "response: (?s)(?&amp;lt;response&amp;gt;.*)"
| spath input=response object3.status output=status
| table status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 08:49:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655573#M226465</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-25T08:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract value from search response which has a text plus json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655583#M226468</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;That json come in search response in multiple lines.&lt;BR /&gt;This is not working for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;rex "response: (?&amp;lt;response&amp;gt;.*)"&lt;BR /&gt;because response is "{".&lt;BR /&gt;&lt;BR /&gt;Maybe rex should ignore new line characters (\n) to solve this situation.&lt;/P&gt;&lt;P&gt;and response would be all json {....}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 06:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655583#M226468</guid>
      <dc:creator>aliosa</dc:creator>
      <dc:date>2023-08-25T06:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract value from search response which has a text plus json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655595#M226471</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I use&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex "response: (?s)(?&amp;lt;response&amp;gt;.*)"&lt;BR /&gt;| spath input=response object3{}.status output=status&lt;BR /&gt;| table response, status&lt;BR /&gt;and it&amp;nbsp; works.&lt;/P&gt;&lt;P&gt;Any better idea ?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 08:27:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655595#M226471</guid>
      <dc:creator>aliosa</dc:creator>
      <dc:date>2023-08-25T08:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract value from search response which has a text plus json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655604#M226474</link>
      <description>&lt;P&gt;I have updated my response.&lt;/P&gt;&lt;P&gt;If it works, this is probably the easiest way to do it. Any other method is likely to be more complex.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 08:50:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655604#M226474</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-25T08:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract value from search response which has a text plus json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655704#M226498</link>
      <description>&lt;P&gt;ok&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2023 10:34:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-value-from-search-response-which-has-a-text-plus/m-p/655704#M226498</guid>
      <dc:creator>aliosa</dc:creator>
      <dc:date>2023-08-26T10:34:19Z</dc:date>
    </item>
  </channel>
</rss>

