<?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: Need to exract amountTendered in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317398#M163587</link>
    <description>&lt;P&gt;tried this too rex "\"amountTendered\"\s:\s\"(?P\d+)\""&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2018 21:57:24 GMT</pubDate>
    <dc:creator>yograjpatel</dc:creator>
    <dc:date>2018-01-16T21:57:24Z</dc:date>
    <item>
      <title>Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317393#M163582</link>
      <description>&lt;P&gt;EWS Response Content:{_  "responseHeader" : {_    "success" : "true",_    "serviceName" : "payment",_    "resourceName" : "payments",_    "operationName" : "create",_    "version" : "1.25.261",_    "statementCode" : "001",_    "methodOfPaymentSequence" : "1",_    "amountTendered" : "705.14",_    "balanceBegin" : "1410.79",_    "balanceEnd" : "705.65",_    "icomsTransactionDateTime" : "20180116",_     "message" : {_      "code" : "PAYMENT_AUTH_SUCCESS",_      "message" : "Payment has been authorized."_    }_  } ]_}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317393#M163582</guid>
      <dc:creator>yograjpatel</dc:creator>
      <dc:date>2020-09-29T17:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317394#M163583</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;how about a regular expression.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rex field=_raw "amountTendered\"\s*\:\s*(?&amp;lt;amountTendered&amp;gt;[^\"]+)"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 21:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317394#M163583</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-01-16T21:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317395#M163584</link>
      <description>&lt;P&gt;I'm getting the total count but not the actual amount to sum up.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 21:39:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317395#M163584</guid>
      <dc:creator>yograjpatel</dc:creator>
      <dc:date>2018-01-16T21:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317396#M163585</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;yeah. We have extracted a string value. You need to convert it into a number first. &lt;/P&gt;

&lt;P&gt;Just do the following after the "rex" command:&lt;BR /&gt;
&lt;CODE&gt;| convert num(amountTendered)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Convert"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Convert&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 21:51:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317396#M163585</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-01-16T21:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317397#M163586</link>
      <description>&lt;P&gt;not working&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 21:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317397#M163586</guid>
      <dc:creator>yograjpatel</dc:creator>
      <dc:date>2018-01-16T21:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317398#M163587</link>
      <description>&lt;P&gt;tried this too rex "\"amountTendered\"\s:\s\"(?P\d+)\""&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 21:57:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317398#M163587</guid>
      <dc:creator>yograjpatel</dc:creator>
      <dc:date>2018-01-16T21:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317399#M163588</link>
      <description>&lt;P&gt;did you really do the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "amountTendered\"\s*\:\s*(?&amp;lt;amountTendered&amp;gt;[^\"]+)"
| convert num(amountTendered)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2018 22:01:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317399#M163588</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-01-16T22:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317400#M163589</link>
      <description>&lt;P&gt;hey @yograjpatel&lt;/P&gt;

&lt;P&gt;Try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="EWS Response Content:{ \"responseHeader\" : { \"success\" : \"true\", \"serviceName\" : \"payment\", \"resourceName\" : \"payments\", \"operationName\" : \"create\", \"version\" : \"1.25.261\", \"statementCode\" : \"001\", \"methodOfPaymentSequence\" : \"1\", \"amountTendered\" : \"705.14\", \"balanceBegin\" : \"1410.79\", \"balanceEnd\" : \"705.65\", \"icomsTransactionDateTime\" : \"20180116\", \"message\" : { \"code\" : \"PAYMENT_AUTH_SUCCESS\", \"message\" : \"Payment has been authorized.\" } } ]}" 
| rex field=_raw "amountTendered\"\s:\s\"(?&amp;lt;amountTendered&amp;gt;[^\"]+)" 
| convert num(amountTendered)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment, you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt; 
| rex field=_raw "amountTendered\"\s:\s\"(?&amp;lt;amountTendered&amp;gt;[^\"]+)" 
| convert num(amountTendered)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this helps !&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 06:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317400#M163589</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-17T06:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317401#M163590</link>
      <description>&lt;P&gt;rex field=_raw "amountTendered\"\s:\s\"(?[^\"]+)"   tried this and it worked&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317401#M163590</guid>
      <dc:creator>yograjpatel</dc:creator>
      <dc:date>2018-01-17T14:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need to exract amountTendered</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317402#M163591</link>
      <description>&lt;P&gt;Hey @yograjpatel &lt;BR /&gt;
If you deem the posted answer is correct then pls accept/upvote to resolve this question.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-exract-amountTendered/m-p/317402#M163591</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-17T14:32:21Z</dc:date>
    </item>
  </channel>
</rss>

