如何在Json中获取值,其中键具有另一个有效载荷形式的值

时间:2019-08-05 09:50:48

标签: jmeter-5.0

我想获取键“ payload”的值中的feed_id(在给定的JSON中为1922)

{
   "data":[
      {
         "is_hide":0,
         "updated_at":"2019-08-02 11:59:50",
         "payload":{
            "action_type":"post_like",
            "sender_name":"Bear Grylls",
            "sender_id":517,
            "sender_thumbnail":"https:\/\/s3.amazonaws.com\/mammalz-qa\/thumbnails\/Abc.",
            "media_type":1,
            "feed_id":1922,
            "message":"Bear Grylls liked your photo."
         }
      }
   ]
}

1 个答案:

答案 0 :(得分:0)

尝试通过某种方式获取feed_id

$.data..feed_id

$..feed_id

$.data[0]..feed_id