parsing - How to parse partial objects inside Json -




i have json structure below, , i'm trying parse key field inside object. it's possible without mapping complete structure?

{  "records":[   {      "eventversion":"2.0",      "s3":{         "s3schemaversion":"1.0",         "configurationid":"my-event",         "bucket":{            "name":"super-files",            "owneridentity":{               "principalid":"41123123"            },            "arn":"arn:aws:s3:::myqueue"         },         "object":{            "key":"/events/mykey",            "size":502,            "etag":"091820398091823",            "sequencer":"1123123"          }        }     }   ] }  // want return key value type object struct {    key string `json:"key"` } 

object part of s3, created struct below , able read key

type root struct {     records []record `json:"records"` }   type record struct {     s3 ss3 `json:"s3"` }  type ss3 struct {     obj object `json:"object"` }  type object struct {     key string `json:"key"` } 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -