vendredi 11 septembre 2020

Postman Testing - JSON - iterate over response with duplicate keys with different values

I'm new to the postman testing and i have found this case. I have this response

{
    "company": [
        {
            "publicKey": "40",
            "mutkey": "13273811",
            "employee": [
                {
                    "publicKey": "3030",
                    "mutkey": "13415424",
                    "formattedName": "V Vierde",
                    "contract": [
                        {
                            "publicKey": "1",
                            "mutkey": "13415424",
                            "functionName": "***NO FUNCTION NAME FOUND***"
                        }
                    ]
                },
                {
                    "publicKey": "3040",
                    "mutkey": "13415426",
                    "formattedName": "V Vijfde",
                    "contract": [
                        {
                            "publicKey": "1",
                            "mutkey": "13415426",
                            "functionName": "***NO FUNCTION NAME FOUND***"
                        }
                    ]
                }
            ]
        }
    ]
}

I need to get into collection, f.e. an Array, every value for key functionName. Is there a way in Postman to do that?

Aucun commentaire:

Enregistrer un commentaire