Skip to content

Conversation

tospery
Copy link

@tospery tospery commented Jun 29, 2022

Different JSON use different keys to identify the values that mean same thing. Likes,
First JSON:

{
    "code" : 200,
    "message" : "success"
}

Second JSON:

{
    "code" : 200,
    "msg" : "success"
}

For the 'success' value, you can access the multi-keys object as follows:

func mapping(map: Map) {
    identifier <- map["message|msg", nested: false, delimiter: "|"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant