0

私はこのjsonオブジェクトを持っています.servicecatalog:nameを反復処理して、「service-foo」または「service-bar」と等しくない名前を警告する方法に興味があります.

ここに私のjsonオブジェクトがあります:

{
    "access": {
        "serviceCatalog": [
            {
                "endpoints": [
                    {
                        "internalURL": "https://snet-storage101.example.com//v1.0", 
                        "publicURL": "https://storage101.example.com//v1.0", 
                        "region": "LON", 
                        "tenantId": "1
                    }, 
                    {
                        "internalURL": "https://snet-storage101.example.com//v1.0", 
                        "publicURL": "https://storage101.example.com//v1.0", 
                        "region": "USA", 
                        "tenantId": "1
                    }
                ], 
                "name": "service-foo", 
                "type": "object-store"
            }, 
            {
                "endpoints": [
                    {
                        "publicURL": "https://x.example.com:9384/v1.0/x", 
                        "tenantId": "6y5t4re32"
                    }
                ], 
                "name": "service-bar", 
                "type": "rax:test"
            }, 
            {
                "endpoints": [
                    {
                        "publicURL": "https://y.example.com:9384/v1.0/x", 
                        "tenantId": "765432"
                    }
                ], 
                "name": "service-thesystem", 
                "type": "rax:test"
            }
        ]
}
4

1 に答える 1