<?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 a JSON value based on a condition in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486866#M83377</link>
    <description>&lt;P&gt;&lt;CODE&gt;for first IsAvailable = true&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;In my answer sample,  '"StartTime": "2020-03-19T10:30:00Z"` right?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;....
| spath path=StatusList{}.status{} output=status
| fields - _*
| mvexpand status
| spath input=status
| table StartTime EndTime IsAvailable score
| search IsAvailable="true"
| head 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 07 Mar 2020 02:41:44 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-03-07T02:41:44Z</dc:date>
    <item>
      <title>How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486860#M83371</link>
      <description>&lt;P&gt;I have payload as below and I need the StartTime and EndTime values where the payload has the first IsAvailable is equal to true&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; "StatusList": [
     {
       "date": "2020-03-13T00:00:00Z",
       "status": [
         {
           "StartTime": "2020-03-13T06:30:00Z",
           "EndTime": "2020-03-13T08:30:00Z",
           "IsAvailable": false,
           "score": 91.05
         },
         {
           "StartTime": "2020-03-13T08:30:00Z",
           "EndTime": "2020-03-13T10:30:00Z",
           "IsAvailable": false,
           "score": 94.29
         },
         {
           "StartTime": "2020-03-13T10:30:00Z",
           "EndTime": "2020-03-13T12:30:00Z",
           "IsAvailable": **true**,
           "score": 100
         },
         {
           "StartTime": "2020-03-13T12:30:00Z",
           "EndTime": "2020-03-13T14:30:00Z",
           "IsAvailable": true,
           "score": 96.1
         },
         {
           "StartTime": "2020-03-13T14:30:00Z",
           "EndTime": "2020-03-13T16:30:00Z",
           "IsAvailable": true,
           "score": 90.39
         },
         {
           "StartTime": "2020-03-13T16:30:00Z",
           "EndTime": "2020-03-13T18:30:00Z",
           "IsAvailable": false,
           "score": 0
         }
       ],
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I achieve this?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 17:35:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486860#M83371</guid>
      <dc:creator>charan986</dc:creator>
      <dc:date>2020-03-06T17:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486861#M83372</link>
      <description>&lt;P&gt;hi @charan986, If this is a valid json then it should parsed before indexing. But if it is not then try this query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="\"StatusList\": [
{
\"date\": \"2020-03-13T00:00:00Z\",
\"status\": [
{
\"StartTime\": \"2020-03-13T06:30:00Z\",
\"EndTime\": \"2020-03-13T08:30:00Z\",
\"IsAvailable\": false,
\"score\": 91.05
},
{
\"StartTime\": \"2020-03-13T08:30:00Z\",
\"EndTime\": \"2020-03-13T10:30:00Z\",
\"IsAvailable\": false,
\"score\": 94.29
},
{
\"StartTime\": \"2020-03-13T10:30:00Z\",
\"EndTime\": \"2020-03-13T12:30:00Z\",
\"IsAvailable\": true,
\"score\": 100
},
{
\"StartTime\": \"2020-03-13T12:30:00Z\",
\"EndTime\": \"2020-03-13T14:30:00Z\",
\"IsAvailable\": true,
\"score\": 96.1
},
{
\"StartTime\": \"2020-03-13T14:30:00Z\",
\"EndTime\": \"2020-03-13T16:30:00Z\",
\"IsAvailable\": true,
\"score\": 90.39
},
{
\"StartTime\": \"2020-03-13T16:30:00Z\",
\"EndTime\": \"2020-03-13T18:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
}
]," 
| eval _raw=replace(replace(_raw, "\"StatusList\": \[", ""), "\],", "") 
| spath output=IsAvailable status{}.IsAvailable 
| spath output=StartTime status{}.StartTime 
| spath output=EndTime status{}.EndTime
| eval zipped=mvzip(IsAvailable,mvzip(StartTime, EndTime)) 
| mvexpand zipped 
| where match(zipped, "true") 
| eval zipped=split(zipped, ",") 
| eval StartTime=mvindex(zipped,0), EndTime=mvindex(zipped,1), IsAvailable=mvindex(zipped,2) | fields - _raw, _time, zipped
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:36:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486861#M83372</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-06T18:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486862#M83373</link>
      <description>&lt;P&gt;Hi @manjunathmeti, please find the valid payload where I need to extract the values of StartTime and EndTime where the payload encounters its first isAvailable = true&lt;BR /&gt;
Using your query the table generates 3 rows where isAvailable  =true, whereas I need only one row where the first isAvailable is true is encountered. can you pls let me know what needs to be changed&lt;/P&gt;

&lt;P&gt;{ "appointment": {&lt;BR /&gt;
"appointmentId": 2,&lt;BR /&gt;
"key": "",&lt;BR /&gt;
"location": {&lt;BR /&gt;
"latitude": 30.7086735,&lt;BR /&gt;
"longitude": -96.42541609999999&lt;BR /&gt;
},&lt;BR /&gt;
"jobDuration": 60,&lt;BR /&gt;
"Type": "Medium",&lt;BR /&gt;
"timeSlotStartTime": "0001-01-01T00:00:00Z",&lt;BR /&gt;
"timeSlotEndTime": "0001-01-01T00:00:00Z",&lt;BR /&gt;
"isVehicleOnly": false,&lt;BR /&gt;
"softId": 12331 }, "StatusList": [&lt;BR /&gt;
{&lt;BR /&gt;
"date": "2020-03-19T00:00:00Z",&lt;BR /&gt;
"status": [&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-19T06:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-19T08:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-19T08:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-19T10:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-19T10:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-19T12:30:00Z",&lt;BR /&gt;
"IsAvailable": true,&lt;BR /&gt;
"score": 100&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-19T12:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-19T14:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-19T14:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-19T16:30:00Z",&lt;BR /&gt;
"IsAvailable": true,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-19T16:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-19T18:30:00Z",&lt;BR /&gt;
"IsAvailable": true,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-19T18:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-19T20:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
}&lt;BR /&gt;
],&lt;BR /&gt;
"error": {&lt;BR /&gt;
"message": ""&lt;BR /&gt;
}&lt;BR /&gt;
} ] }&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 21:49:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486862#M83373</guid>
      <dc:creator>charan986</dc:creator>
      <dc:date>2020-03-06T21:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486863#M83374</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{ \"appointment\": {
\"appointmentId\": 2,
\"key\": \"\",
\"location\": {
\"latitude\": 30.7086735,
\"longitude\": -96.42541609999999
},
\"jobDuration\": 60,
\"Type\": \"Medium\",
\"timeSlotStartTime\": \"0001-01-01T00:00:00Z\",
\"timeSlotEndTime\": \"0001-01-01T00:00:00Z\",
\"isVehicleOnly\": false,
\"softId\": 12331 }, \"StatusList\": [
{
\"date\": \"2020-03-19T00:00:00Z\",
\"status\": [
{
\"StartTime\": \"2020-03-19T06:30:00Z\",
\"EndTime\": \"2020-03-19T08:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
},
{
\"StartTime\": \"2020-03-19T08:30:00Z\",
\"EndTime\": \"2020-03-19T10:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
},
{
\"StartTime\": \"2020-03-19T10:30:00Z\",
\"EndTime\": \"2020-03-19T12:30:00Z\",
\"IsAvailable\": true,
\"score\": 100
},
{
\"StartTime\": \"2020-03-19T12:30:00Z\",
\"EndTime\": \"2020-03-19T14:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
},
{
\"StartTime\": \"2020-03-19T14:30:00Z\",
\"EndTime\": \"2020-03-19T16:30:00Z\",
\"IsAvailable\": true,
\"score\": 0
},
{
\"StartTime\": \"2020-03-19T16:30:00Z\",
\"EndTime\": \"2020-03-19T18:30:00Z\",
\"IsAvailable\": true,
\"score\": 0
},
{
\"StartTime\": \"2020-03-19T18:30:00Z\",
\"EndTime\": \"2020-03-19T20:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
}
],
\"error\": {
\"message\": \"\"
    }
} ] }"
| spath path=StatusList{}.status{} output=status
| spath path=StatusList{}.date 
| spath path=StatusList{}.error.message output=error_message
| spath
| fields - _* StatusList*
| stats values(*) as * by status
| spath input=status
| fields - status
| rename appointment.* as *
| table StartTime EndTime IsAvailable score *
| search IsAvailable="true"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 23:22:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486863#M83374</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-06T23:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486864#M83375</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;....
| spath path=StatusList{}.status{} output=status
| fields - _*
| stats count by status
| spath input=status
| fields - status count
| search IsAvailable="true"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you only want the fields &lt;EM&gt;StartTime EndTime IsAvailable score&lt;/EM&gt; , this query is better.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 23:29:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486864#M83375</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-06T23:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486865#M83376</link>
      <description>&lt;P&gt;Hi @to4kawa thanks for responding, may I know how can I generate a table with only one row with StartTime EndTime values for first IsAvailable = true&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 01:14:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486865#M83376</guid>
      <dc:creator>charan986</dc:creator>
      <dc:date>2020-03-07T01:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486866#M83377</link>
      <description>&lt;P&gt;&lt;CODE&gt;for first IsAvailable = true&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;In my answer sample,  '"StartTime": "2020-03-19T10:30:00Z"` right?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;....
| spath path=StatusList{}.status{} output=status
| fields - _*
| mvexpand status
| spath input=status
| table StartTime EndTime IsAvailable score
| search IsAvailable="true"
| head 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Mar 2020 02:41:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486866#M83377</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-07T02:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486867#M83378</link>
      <description>&lt;P&gt;Hi @manjunathmeti , I have not put the whole payload where I have an array of status , can you let me know how can i extract all the status values from below payload&lt;BR /&gt;
{ "appointment": {&lt;BR /&gt;
"appointmentId": 0,&lt;BR /&gt;
"key": "",&lt;BR /&gt;
"Durations": 60,&lt;BR /&gt;
"JType": "Medium",&lt;BR /&gt;
"StartTime": "0001-01-01T00:00:00Z",&lt;BR /&gt;
"EndTime": "0001-01-01T00:00:00Z",&lt;BR /&gt;
"isDegOnly": false,&lt;BR /&gt;
"softId": 112892 },&lt;BR /&gt;
"commonID": "REDRF3243",&lt;BR /&gt;
"slotStatusList": [&lt;BR /&gt;
{&lt;BR /&gt;
"date": "2020-03-24T00:00:00Z",&lt;BR /&gt;
"status": [&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-24T06:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-24T08:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-24T08:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-24T10:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-24T10:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-24T12:30:00Z",&lt;BR /&gt;
"IsAvailable": true,&lt;BR /&gt;
"score": 100&lt;BR /&gt;
}&lt;BR /&gt;
],&lt;BR /&gt;
"error": {&lt;BR /&gt;
"message": ""&lt;BR /&gt;
}&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"date": "2020-03-25T00:00:00Z",&lt;BR /&gt;
"status": [&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-25T06:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-25T08:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-25T08:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-25T10:30:00Z",&lt;BR /&gt;
"IsAvailable": true,&lt;BR /&gt;
"score": 92.44&lt;BR /&gt;
},&lt;BR /&gt;
{&lt;BR /&gt;
"StartTime": "2020-03-25T10:30:00Z",&lt;BR /&gt;
"EndTime": "2020-03-25T12:30:00Z",&lt;BR /&gt;
"IsAvailable": false,&lt;BR /&gt;
"score": 0&lt;BR /&gt;
}&lt;BR /&gt;
],&lt;BR /&gt;
"error": {&lt;BR /&gt;
"message": ""&lt;BR /&gt;
}&lt;BR /&gt;
} ] }&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 23:15:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486867#M83378</guid>
      <dc:creator>charan986</dc:creator>
      <dc:date>2020-03-10T23:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486868#M83379</link>
      <description>&lt;P&gt;Your stuff is not valid JSON so first fix that.  Once that is true, just do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{
    \"StatusList\": [{
        \"date\": \"2020-03-13T00:00:00Z\",
        \"status\": [{
                \"StartTime\": \"2020-03-13T06:30:00Z\",
                \"EndTime\": \"2020-03-13T08:30:00Z\",
                \"IsAvailable\": false,
                \"score\": 91.05
            },
            {
                \"StartTime\": \"2020-03-13T08:30:00Z\",
                \"EndTime\": \"2020-03-13T10:30:00Z\",
                \"IsAvailable\": false,
                \"score\": 94.29
            },
            {
                \"StartTime\": \"2020-03-13T10:30:00Z\",
                \"EndTime\": \"2020-03-13T12:30:00Z\",
                \"IsAvailable\": true,
                \"score\": 100
            },
            {
                \"StartTime\": \"2020-03-13T12:30:00Z\",
                \"EndTime\": \"2020-03-13T14:30:00Z\",
                \"IsAvailable\": true,
                \"score\": 96.1
            },
            {
                \"StartTime\": \"2020-03-13T14:30:00Z\",
                \"EndTime\": \"2020-03-13T16:30:00Z\",
                \"IsAvailable\": true,
                \"score\": 90.39
            },
            {
                \"StartTime\": \"2020-03-13T16:30:00Z\",
                \"EndTime\": \"2020-03-13T18:30:00Z\",
                \"IsAvailable\": false,
                \"score\": 0
            }
        ]
    }]
}"
| rename COMMENT AS "I have payload as below and I need the StartTime and EndTime values where the payload has the first IsAvailable is equal to true" 
| kv
| eval FirstTruePos = mvfind('StatusList{}.status{}.IsAvailable', "true")
| eval StartTime = mvindex('StatusList{}.status{}.StartTime', FirstTruePos)
| eval EndTime = mvindex('StatusList{}.status{}.EndTime', FirstTruePos)
| eval MvField = "1 2 3 4 5 6 7"
| makemv MvField
| eval MvField = mvindex(MvField, FirstTruePos)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2020 03:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486868#M83379</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-11T03:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486869#M83380</link>
      <description>&lt;P&gt;Hi @charan986,&lt;/P&gt;

&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{ \"appointment\": {
\"appointmentId\": 0,
\"key\": \"\",
\"Durations\": 60,
\"JType\": \"Medium\",
\"StartTime\": \"0001-01-01T00:00:00Z\",
\"EndTime\": \"0001-01-01T00:00:00Z\",
\"isDegOnly\": false,
\"softId\": 112892 },
\"commonID\": \"REDRF3243\",
\"slotStatusList\": [
{
\"date\": \"2020-03-24T00:00:00Z\",
\"status\": [
{
\"StartTime\": \"2020-03-24T06:30:00Z\",
\"EndTime\": \"2020-03-24T08:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
},
{
\"StartTime\": \"2020-03-24T08:30:00Z\",
\"EndTime\": \"2020-03-24T10:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
},
{
\"StartTime\": \"2020-03-24T10:30:00Z\",
\"EndTime\": \"2020-03-24T12:30:00Z\",
\"IsAvailable\": true,
\"score\": 100
}
],
\"error\": {
\"message\": \"\"
    }
},
{
\"date\": \"2020-03-25T00:00:00Z\",
\"status\": [
{
\"StartTime\": \"2020-03-25T06:30:00Z\",
\"EndTime\": \"2020-03-25T08:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
},
{
\"StartTime\": \"2020-03-25T08:30:00Z\",
\"EndTime\": \"2020-03-25T10:30:00Z\",
\"IsAvailable\": true,
\"score\": 92.44
},
{
\"StartTime\": \"2020-03-25T10:30:00Z\",
\"EndTime\": \"2020-03-25T12:30:00Z\",
\"IsAvailable\": false,
\"score\": 0
}
],
\"error\": {
\"message\": \"\"
    }
} ] }" 
| spath path=slotStatusList{} output=slotStatusList 
| mvexpand slotStatusList 
| spath input=slotStatusList path=status{} output=status 
| mvexpand status 
| spath input=status 
| spath input=slotStatusList 
| spath 
| table StartTime, EndTime, IsAvailable, score, appointment*, error*, commonID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2020 06:57:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486869#M83380</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-11T06:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a JSON value based on a condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486870#M83381</link>
      <description>&lt;P&gt;Thanks for responding @manjunathmeti ,  using the above query i'm able to get only the first status of SlotStatusList array, As show in the picture from the URL below, I need all the status list values from the SlotStausList. &lt;BR /&gt;
and also can you pls let me know how can get the value of start and end time values where there is a isAvailable = true in the whole payload&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 18:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-a-JSON-value-based-on-a-condition/m-p/486870#M83381</guid>
      <dc:creator>charan986</dc:creator>
      <dc:date>2020-03-11T18:23:11Z</dc:date>
    </item>
  </channel>
</rss>

