Flatten Object Array

Provides the ability to transform an array of multi-level/complex objects into its flattened representation.

Version 1

HTTP Request
POST /ado/v1/FlattenObjectArray

Header

ParameterDescription
Ocp-Apim-Subscription-KeyThe subscription key you received when you purchased a plan.

Request Body

Mandatory

ParameterTypeDescription
dataobject[]Array of complex, multi-level objects.

Optional

ParameterTypeDescription
delimiterstringThe flattened hierarchy representation of each object will be separated by this string.
balancedOutputbooleantrue will force the resulting output to be structured as a balanced output, false will not. Please see the examples for more information.

Note: Setting this to true has the potential to have an adverse impact on performance but is required if there is a desire to use the filter, sortOrder and schema options.

Common

Further Documentation: Common Parameters

ParameterTypeDescription
filterStringA fully functioning SQL based WHERE statement that will filter the outgoing dataset to the records it determines as being included.
sortOrderObjectSorts the resulting dataset by the criteria provided.
The object should contain property names that represent properties contained within the resulting dataset with a value corresponding to the desired sort direction (i.e. ASC or DESC).
schemaObjectYou can use this parameter to override the inferred schema for properties in the incoming dataset(s).
A field will be inferred unless specific explicitly within this object.
advancedOptionsObjectIs an object with the following properties.

cultureName (String)
The specified culture determines the behaviour for aspects related to formatting numeric values and dates. Is extremely important when converting strings to dates, e.g. 05/03/2022 will be treated differently between locales. For more information on the accepted values for this property, please consult the documentation from Microsoft … https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=net-6.0#culture-names-and-identifiers

isBoolean (string[])
A list of strings that are the names of all properties in the resulting dataset that should be treated as boolean values.

By default, the framework treats boolean values as 1 (true) or 0 (false). In order to differentiate the integer as a boolean, the property in question needs to be called out explicitly in this list.

Notes

The different levels of properties within a complex object will be flattened into a single property whose name will be derived from all properties determined in the hierarchy separated by the delimiter provided.

Arrays and the items within the array will be indicated by the index the item was found at.

Please refer to the examples below for more information.

Examples

Unbalanced
Balanced
restcountries.com

This example demonstrates a complex array of multi-level objects flattened into an array of unbalanced objects.

The resulting items in the array are clearly different and retain their original structure albeit as a flattened representation.

Request

{
    "delimiter": "/",
    "balancedOutput": false,
    "data": [
        {
            "Field3": "Value 1.3",
            "Field4": {
                "Field4.2": "Value 1.4.2",
                "Field4.3": "Value 1.4.3"
            },
            "Field5": [
                {
                    "Field5.1": "Value 1.5.1.1",
                    "Field5.2": "Value 1.5.1.2"
                },
                {
                    "Field5.1": "Value 1.5.2.1",
                    "Field5.2": "Value 1.5.2.2"
                },
                {
                    "Field5.1": "Value 1.5.3.1",
                    "Field5.2": "Value 1.5.4.2"
                }                                
            ]
        },
        {
            "Field1": "Value 1.1",
            "Field2": "Value 1.2",
            "Field4": {
                "Field4.1": "Value 1.4.1",
                "Field4.3": "Value 1.4.3"
            },
            "Field5": [
                {
                    "Field5.1": "Value 1.5.1.1",
                    "Field5.2": "Value 1.5.1.2"
                },
                {
                    "Field5.1": "Value 1.5.3.1",
                    "Field5.2": "Value 1.5.4.2"
                }                                
            ]
        }        
    ]
}
Code language: JSON / JSON with Comments (json)

Response

[
    {
        "Field3": "Value 1.3",
        "Field4/Field4.2": "Value 1.4.2",
        "Field4/Field4.3": "Value 1.4.3",
        "Field5/0/Field5.1": "Value 1.5.1.1",
        "Field5/0/Field5.2": "Value 1.5.1.2",
        "Field5/1/Field5.1": "Value 1.5.2.1",
        "Field5/1/Field5.2": "Value 1.5.2.2",
        "Field5/2/Field5.1": "Value 1.5.3.1",
        "Field5/2/Field5.2": "Value 1.5.4.2"
    },
    {
        "Field1": "Value 1.1",
        "Field2": "Value 1.2",
        "Field4/Field4.1": "Value 1.4.1",
        "Field4/Field4.3": "Value 1.4.3",
        "Field5/0/Field5.1": "Value 1.5.1.1",
        "Field5/0/Field5.2": "Value 1.5.1.2",
        "Field5/1/Field5.1": "Value 1.5.3.1",
        "Field5/1/Field5.2": "Value 1.5.4.2"
    }
]
Code language: JSON / JSON with Comments (json)

This example demonstrates a complex array of multi-level objects flattened into an array of balanced objects.

The resulting items in the array are all structured exactly the same but as expected, the values differ across items. Where gaps exist, nulls are in place.

Request

{
    "delimiter": "/",
    "balancedOutput": true,
    "data": [
        {
            "Field3": "Value 1.3",
            "Field4": {
                "Field4.2": "Value 1.4.2",
                "Field4.3": "Value 1.4.3"
            },
            "Field5": [
                {
                    "Field5.1": "Value 1.5.1.1",
                    "Field5.2": "Value 1.5.1.2"
                },
                {
                    "Field5.1": "Value 1.5.2.1",
                    "Field5.2": "Value 1.5.2.2"
                },
                {
                    "Field5.1": "Value 1.5.3.1",
                    "Field5.2": "Value 1.5.4.2"
                }                                
            ]
        },
        {
            "Field1": "Value 1.1",
            "Field2": "Value 1.2",
            "Field4": {
                "Field4.1": "Value 1.4.1",
                "Field4.3": "Value 1.4.3"
            },
            "Field5": [
                {
                    "Field5.1": "Value 1.5.1.1",
                    "Field5.2": "Value 1.5.1.2"
                },
                {
                    "Field5.1": "Value 1.5.3.1",
                    "Field5.2": "Value 1.5.4.2"
                }                                
            ]
        }        
    ]
}
Code language: JSON / JSON with Comments (json)

Response

[
    {
        "Field3": "Value 1.3",
        "Field4/Field4.2": "Value 1.4.2",
        "Field4/Field4.3": "Value 1.4.3",
        "Field5/0/Field5.1": "Value 1.5.1.1",
        "Field5/0/Field5.2": "Value 1.5.1.2",
        "Field5/1/Field5.1": "Value 1.5.2.1",
        "Field5/1/Field5.2": "Value 1.5.2.2",
        "Field5/2/Field5.1": "Value 1.5.3.1",
        "Field5/2/Field5.2": "Value 1.5.4.2",
        "Field1": null,
        "Field2": null,
        "Field4/Field4.1": null
    },
    {
        "Field3": null,
        "Field4/Field4.2": null,
        "Field4/Field4.3": "Value 1.4.3",
        "Field5/0/Field5.1": "Value 1.5.1.1",
        "Field5/0/Field5.2": "Value 1.5.1.2",
        "Field5/1/Field5.1": "Value 1.5.3.1",
        "Field5/1/Field5.2": "Value 1.5.4.2",
        "Field5/2/Field5.1": null,
        "Field5/2/Field5.2": null,
        "Field1": "Value 1.1",
        "Field2": "Value 1.2",
        "Field4/Field4.1": "Value 1.4.1"
    }
]
Code language: JSON / JSON with Comments (json)

The dataset in the example is a very small subset of the response from a call to https://restcountries.com/v3.1/all

It demonstrates that no matter how complex, the framework will handle the multiple levels of any object it is asked to flatten.

Note that the output is balanced, therefore, the same properties should exist across all items of the resulting array.

Request

{
    "delimiter": "/",
    "balancedOutput": true,
    "data": [
        {
            "name": {
                "common": "Germany",
                "official": "Federal Republic of Germany",
                "nativeName": {
                    "deu": {
                        "official": "Bundesrepublik Deutschland",
                        "common": "Deutschland"
                    }
                }
            },
            "tld": [
                ".de"
            ],
            "cca2": "DE",
            "ccn3": "276",
            "cca3": "DEU",
            "cioc": "GER",
            "independent": true,
            "status": "officially-assigned",
            "unMember": true,
            "currencies": {
                "EUR": {
                    "name": "Euro",
                    "symbol": "€"
                }
            },
            "idd": {
                "root": "+4",
                "suffixes": [
                    "9"
                ]
            },
            "capital": [
                "Berlin"
            ],
            "altSpellings": [
                "DE",
                "Federal Republic of Germany",
                "Bundesrepublik Deutschland"
            ],
            "region": "Europe",
            "subregion": "Western Europe",
            "languages": {
                "deu": "German"
            },
            "translations": {
                "ara": {
                    "official": "جمهورية ألمانيا الاتحادية",
                    "common": "ألمانيا"
                },
                "ces": {
                    "official": "Spolková republika Německo",
                    "common": "Německo"
                },
                "cym": {
                    "official": "Federal Republic of Germany",
                    "common": "Germany"
                },
                "deu": {
                    "official": "Bundesrepublik Deutschland",
                    "common": "Deutschland"
                },
                "est": {
                    "official": "Saksamaa Liitvabariik",
                    "common": "Saksamaa"
                },
                "fin": {
                    "official": "Saksan liittotasavalta",
                    "common": "Saksa"
                },
                "fra": {
                    "official": "République fédérale d'Allemagne",
                    "common": "Allemagne"
                },
                "hrv": {
                    "official": "Njemačka Federativna Republika",
                    "common": "Njemačka"
                },
                "hun": {
                    "official": "Német Szövetségi Köztársaság",
                    "common": "Németország"
                },
                "ita": {
                    "official": "Repubblica federale di Germania",
                    "common": "Germania"
                },
                "jpn": {
                    "official": "ドイツ連邦共和国",
                    "common": "ドイツ"
                },
                "kor": {
                    "official": "독일 연방 공화국",
                    "common": "독일"
                },
                "nld": {
                    "official": "Bondsrepubliek Duitsland",
                    "common": "Duitsland"
                },
                "per": {
                    "official": "جمهوری فدرال آلمان",
                    "common": "آلمان"
                },
                "pol": {
                    "official": "Republika Federalna Niemiec",
                    "common": "Niemcy"
                },
                "por": {
                    "official": "República Federal da Alemanha",
                    "common": "Alemanha"
                },
                "rus": {
                    "official": "Федеративная Республика Германия",
                    "common": "Германия"
                },
                "slk": {
                    "official": "Nemecká spolková republika",
                    "common": "Nemecko"
                },
                "spa": {
                    "official": "República Federal de Alemania",
                    "common": "Alemania"
                },
                "swe": {
                    "official": "Förbundsrepubliken Tyskland",
                    "common": "Tyskland"
                },
                "urd": {
                    "official": "وفاقی جمہوریہ جرمنی",
                    "common": "جرمنی"
                },
                "zho": {
                    "official": "德意志联邦共和国",
                    "common": "德国"
                }
            },
            "latlng": [
                51,
                9
            ],
            "landlocked": false,
            "borders": [
                "AUT",
                "BEL",
                "CZE",
                "DNK",
                "FRA",
                "LUX",
                "NLD",
                "POL",
                "CHE"
            ],
            "area": 357114,
            "demonyms": {
                "eng": {
                    "f": "German",
                    "m": "German"
                },
                "fra": {
                    "f": "Allemande",
                    "m": "Allemand"
                }
            },
            "flag": "🇩🇪",
            "maps": {
                "googleMaps": "https://goo.gl/maps/mD9FBMq1nvXUBrkv6",
                "openStreetMaps": "https://www.openstreetmap.org/relation/51477"
            },
            "population": 83240525,
            "gini": {
                "2016": 31.9
            },
            "fifa": "GER",
            "car": {
                "signs": [
                    "DY"
                ],
                "side": "right"
            },
            "timezones": [
                "UTC+01:00"
            ],
            "continents": [
                "Europe"
            ],
            "flags": {
                "png": "https://flagcdn.com/w320/de.png",
                "svg": "https://flagcdn.com/de.svg"
            },
            "coatOfArms": {
                "png": "https://mainfacts.com/media/images/coats_of_arms/de.png",
                "svg": "https://mainfacts.com/media/images/coats_of_arms/de.svg"
            },
            "startOfWeek": "monday",
            "capitalInfo": {
                "latlng": [
                    52.52,
                    13.4
                ]
            },
            "postalCode": {
                "format": "#####",
                "regex": "^(\\d{5})$"
            }
        },
        {
            "name": {
                "common": "Morocco",
                "official": "Kingdom of Morocco",
                "nativeName": {
                    "ara": {
                        "official": "المملكة المغربية",
                        "common": "المغرب"
                    },
                    "ber": {
                        "official": "ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⵖⵔⵉⴱ",
                        "common": "ⵍⵎⴰⵖⵔⵉⴱ"
                    }
                }
            },
            "tld": [
                ".ma",
                "المغرب."
            ],
            "cca2": "MA",
            "ccn3": "504",
            "cca3": "MAR",
            "cioc": "MAR",
            "independent": true,
            "status": "officially-assigned",
            "unMember": true,
            "currencies": {
                "MAD": {
                    "name": "Moroccan dirham",
                    "symbol": "د.م."
                }
            },
            "idd": {
                "root": "+2",
                "suffixes": [
                    "12"
                ]
            },
            "capital": [
                "Rabat"
            ],
            "altSpellings": [
                "MA",
                "Kingdom of Morocco",
                "Al-Mamlakah al-Maġribiyah"
            ],
            "region": "Africa",
            "subregion": "Northern Africa",
            "languages": {
                "ara": "Arabic",
                "ber": "Berber"
            },
            "translations": {
                "ara": {
                    "official": "المملكة المغربية",
                    "common": "المغرب"
                },
                "ces": {
                    "official": "Marocké království",
                    "common": "Maroko"
                },
                "cym": {
                    "official": "Kingdom of Morocco",
                    "common": "Morocco"
                },
                "deu": {
                    "official": "Königreich Marokko",
                    "common": "Marokko"
                },
                "est": {
                    "official": "Maroko Kuningriik",
                    "common": "Maroko"
                },
                "fin": {
                    "official": "Marokon kuningaskunta",
                    "common": "Marokko"
                },
                "fra": {
                    "official": "Royaume du Maroc",
                    "common": "Maroc"
                },
                "hrv": {
                    "official": "Kraljevina Maroko",
                    "common": "Maroko"
                },
                "hun": {
                    "official": "Marokkói Királyság",
                    "common": "Marokkó"
                },
                "ita": {
                    "official": "Regno del Marocco",
                    "common": "Marocco"
                },
                "jpn": {
                    "official": "モロッコ王国",
                    "common": "モロッコ"
                },
                "kor": {
                    "official": "모로코 왕국",
                    "common": "모로코"
                },
                "nld": {
                    "official": "Koninkrijk Marokko",
                    "common": "Marokko"
                },
                "per": {
                    "official": "پادشاهی مراکش",
                    "common": "مراکش"
                },
                "pol": {
                    "official": "Królestwo Marokańskie",
                    "common": "Maroko"
                },
                "por": {
                    "official": "Reino de Marrocos",
                    "common": "Marrocos"
                },
                "rus": {
                    "official": "Королевство Марокко",
                    "common": "Марокко"
                },
                "slk": {
                    "official": "Marocké kniežatstvo",
                    "common": "Maroko"
                },
                "spa": {
                    "official": "Reino de Marruecos",
                    "common": "Marruecos"
                },
                "swe": {
                    "official": "Konungariket Marocko",
                    "common": "Marocko"
                },
                "urd": {
                    "official": "مملکتِ مراکش",
                    "common": "مراکش"
                },
                "zho": {
                    "official": "摩洛哥王国",
                    "common": "摩洛哥"
                }
            },
            "latlng": [
                32,
                -5
            ],
            "landlocked": false,
            "borders": [
                "DZA",
                "ESH",
                "ESP"
            ],
            "area": 446550,
            "demonyms": {
                "eng": {
                    "f": "Moroccan",
                    "m": "Moroccan"
                },
                "fra": {
                    "f": "Marocaine",
                    "m": "Marocain"
                }
            },
            "flag": "🇲🇦",
            "maps": {
                "googleMaps": "https://goo.gl/maps/6oMv3dyBZg3iaXQ5A",
                "openStreetMaps": "https://www.openstreetmap.org/relation/3630439"
            },
            "population": 36910558,
            "gini": {
                "2013": 39.5
            },
            "fifa": "MAR",
            "car": {
                "signs": [
                    "MA"
                ],
                "side": "right"
            },
            "timezones": [
                "UTC"
            ],
            "continents": [
                "Africa"
            ],
            "flags": {
                "png": "https://flagcdn.com/w320/ma.png",
                "svg": "https://flagcdn.com/ma.svg"
            },
            "coatOfArms": {
                "png": "https://mainfacts.com/media/images/coats_of_arms/ma.png",
                "svg": "https://mainfacts.com/media/images/coats_of_arms/ma.svg"
            },
            "startOfWeek": "monday",
            "capitalInfo": {
                "latlng": [
                    34.02,
                    -6.82
                ]
            },
            "postalCode": {
                "format": "#####",
                "regex": "^(\\d{5})$"
            }
        }
    ]
}
Code language: JSON / JSON with Comments (json)

Response

[
    {
        "name/common": "Germany",
        "name/official": "Federal Republic of Germany",
        "name/nativeName/deu/official": "Bundesrepublik Deutschland",
        "name/nativeName/deu/common": "Deutschland",
        "tld/0": ".de",
        "cca2": "DE",
        "ccn3": "276",
        "cca3": "DEU",
        "cioc": "GER",
        "independent": true,
        "status": "officially-assigned",
        "unMember": true,
        "currencies/EUR/name": "Euro",
        "currencies/EUR/symbol": "€",
        "idd/root": "+4",
        "idd/suffixes/0": "9",
        "capital/0": "Berlin",
        "altSpellings/0": "DE",
        "altSpellings/1": "Federal Republic of Germany",
        "altSpellings/2": "Bundesrepublik Deutschland",
        "region": "Europe",
        "subregion": "Western Europe",
        "languages/deu": "German",
        "translations/ara/official": "جمهورية ألمانيا الاتحادية",
        "translations/ara/common": "ألمانيا",
        "translations/ces/official": "Spolková republika Německo",
        "translations/ces/common": "Německo",
        "translations/cym/official": "Federal Republic of Germany",
        "translations/cym/common": "Germany",
        "translations/deu/official": "Bundesrepublik Deutschland",
        "translations/deu/common": "Deutschland",
        "translations/est/official": "Saksamaa Liitvabariik",
        "translations/est/common": "Saksamaa",
        "translations/fin/official": "Saksan liittotasavalta",
        "translations/fin/common": "Saksa",
        "translations/fra/official": "République fédérale d'Allemagne",
        "translations/fra/common": "Allemagne",
        "translations/hrv/official": "Njemačka Federativna Republika",
        "translations/hrv/common": "Njemačka",
        "translations/hun/official": "Német Szövetségi Köztársaság",
        "translations/hun/common": "Németország",
        "translations/ita/official": "Repubblica federale di Germania",
        "translations/ita/common": "Germania",
        "translations/jpn/official": "ドイツ連邦共和国",
        "translations/jpn/common": "ドイツ",
        "translations/kor/official": "독일 연방 공화국",
        "translations/kor/common": "독일",
        "translations/nld/official": "Bondsrepubliek Duitsland",
        "translations/nld/common": "Duitsland",
        "translations/per/official": "جمهوری فدرال آلمان",
        "translations/per/common": "آلمان",
        "translations/pol/official": "Republika Federalna Niemiec",
        "translations/pol/common": "Niemcy",
        "translations/por/official": "República Federal da Alemanha",
        "translations/por/common": "Alemanha",
        "translations/rus/official": "Федеративная Республика Германия",
        "translations/rus/common": "Германия",
        "translations/slk/official": "Nemecká spolková republika",
        "translations/slk/common": "Nemecko",
        "translations/spa/official": "República Federal de Alemania",
        "translations/spa/common": "Alemania",
        "translations/swe/official": "Förbundsrepubliken Tyskland",
        "translations/swe/common": "Tyskland",
        "translations/urd/official": "وفاقی جمہوریہ جرمنی",
        "translations/urd/common": "جرمنی",
        "translations/zho/official": "德意志联邦共和国",
        "translations/zho/common": "德国",
        "latlng/0": 51,
        "latlng/1": 9,
        "landlocked": false,
        "borders/0": "AUT",
        "borders/1": "BEL",
        "borders/2": "CZE",
        "borders/3": "DNK",
        "borders/4": "FRA",
        "borders/5": "LUX",
        "borders/6": "NLD",
        "borders/7": "POL",
        "borders/8": "CHE",
        "area": 357114,
        "demonyms/eng/f": "German",
        "demonyms/eng/m": "German",
        "demonyms/fra/f": "Allemande",
        "demonyms/fra/m": "Allemand",
        "flag": "🇩🇪",
        "maps/googleMaps": "https://goo.gl/maps/mD9FBMq1nvXUBrkv6",
        "maps/openStreetMaps": "https://www.openstreetmap.org/relation/51477",
        "population": 83240525,
        "gini/2016": 31.9,
        "fifa": "GER",
        "car/signs/0": "DY",
        "car/side": "right",
        "timezones/0": "UTC+01:00",
        "continents/0": "Europe",
        "flags/png": "https://flagcdn.com/w320/de.png",
        "flags/svg": "https://flagcdn.com/de.svg",
        "coatOfArms/png": "https://mainfacts.com/media/images/coats_of_arms/de.png",
        "coatOfArms/svg": "https://mainfacts.com/media/images/coats_of_arms/de.svg",
        "startOfWeek": "monday",
        "capitalInfo/latlng/0": 52.52,
        "capitalInfo/latlng/1": 13.4,
        "postalCode/format": "#####",
        "postalCode/regex": "^(\\d{5})$",
        "name/nativeName/ara/official": null,
        "name/nativeName/ara/common": null,
        "name/nativeName/ber/official": null,
        "name/nativeName/ber/common": null,
        "tld/1": null,
        "currencies/MAD/name": null,
        "currencies/MAD/symbol": null,
        "languages/ara": null,
        "languages/ber": null,
        "gini/2013": null
    },
    {
        "name/common": "Morocco",
        "name/official": "Kingdom of Morocco",
        "name/nativeName/deu/official": null,
        "name/nativeName/deu/common": null,
        "tld/0": ".ma",
        "cca2": "MA",
        "ccn3": "504",
        "cca3": "MAR",
        "cioc": "MAR",
        "independent": true,
        "status": "officially-assigned",
        "unMember": true,
        "currencies/EUR/name": null,
        "currencies/EUR/symbol": null,
        "idd/root": "+2",
        "idd/suffixes/0": "12",
        "capital/0": "Rabat",
        "altSpellings/0": "MA",
        "altSpellings/1": "Kingdom of Morocco",
        "altSpellings/2": "Al-Mamlakah al-Maġribiyah",
        "region": "Africa",
        "subregion": "Northern Africa",
        "languages/deu": null,
        "translations/ara/official": "المملكة المغربية",
        "translations/ara/common": "المغرب",
        "translations/ces/official": "Marocké království",
        "translations/ces/common": "Maroko",
        "translations/cym/official": "Kingdom of Morocco",
        "translations/cym/common": "Morocco",
        "translations/deu/official": "Königreich Marokko",
        "translations/deu/common": "Marokko",
        "translations/est/official": "Maroko Kuningriik",
        "translations/est/common": "Maroko",
        "translations/fin/official": "Marokon kuningaskunta",
        "translations/fin/common": "Marokko",
        "translations/fra/official": "Royaume du Maroc",
        "translations/fra/common": "Maroc",
        "translations/hrv/official": "Kraljevina Maroko",
        "translations/hrv/common": "Maroko",
        "translations/hun/official": "Marokkói Királyság",
        "translations/hun/common": "Marokkó",
        "translations/ita/official": "Regno del Marocco",
        "translations/ita/common": "Marocco",
        "translations/jpn/official": "モロッコ王国",
        "translations/jpn/common": "モロッコ",
        "translations/kor/official": "모로코 왕국",
        "translations/kor/common": "모로코",
        "translations/nld/official": "Koninkrijk Marokko",
        "translations/nld/common": "Marokko",
        "translations/per/official": "پادشاهی مراکش",
        "translations/per/common": "مراکش",
        "translations/pol/official": "Królestwo Marokańskie",
        "translations/pol/common": "Maroko",
        "translations/por/official": "Reino de Marrocos",
        "translations/por/common": "Marrocos",
        "translations/rus/official": "Королевство Марокко",
        "translations/rus/common": "Марокко",
        "translations/slk/official": "Marocké kniežatstvo",
        "translations/slk/common": "Maroko",
        "translations/spa/official": "Reino de Marruecos",
        "translations/spa/common": "Marruecos",
        "translations/swe/official": "Konungariket Marocko",
        "translations/swe/common": "Marocko",
        "translations/urd/official": "مملکتِ مراکش",
        "translations/urd/common": "مراکش",
        "translations/zho/official": "摩洛哥王国",
        "translations/zho/common": "摩洛哥",
        "latlng/0": 32,
        "latlng/1": -5,
        "landlocked": false,
        "borders/0": "DZA",
        "borders/1": "ESH",
        "borders/2": "ESP",
        "borders/3": null,
        "borders/4": null,
        "borders/5": null,
        "borders/6": null,
        "borders/7": null,
        "borders/8": null,
        "area": 446550,
        "demonyms/eng/f": "Moroccan",
        "demonyms/eng/m": "Moroccan",
        "demonyms/fra/f": "Marocaine",
        "demonyms/fra/m": "Marocain",
        "flag": "🇲🇦",
        "maps/googleMaps": "https://goo.gl/maps/6oMv3dyBZg3iaXQ5A",
        "maps/openStreetMaps": "https://www.openstreetmap.org/relation/3630439",
        "population": 36910558,
        "gini/2016": null,
        "fifa": "MAR",
        "car/signs/0": "MA",
        "car/side": "right",
        "timezones/0": "UTC",
        "continents/0": "Africa",
        "flags/png": "https://flagcdn.com/w320/ma.png",
        "flags/svg": "https://flagcdn.com/ma.svg",
        "coatOfArms/png": "https://mainfacts.com/media/images/coats_of_arms/ma.png",
        "coatOfArms/svg": "https://mainfacts.com/media/images/coats_of_arms/ma.svg",
        "startOfWeek": "monday",
        "capitalInfo/latlng/0": 34.02,
        "capitalInfo/latlng/1": -6.82,
        "postalCode/format": "#####",
        "postalCode/regex": "^(\\d{5})$",
        "name/nativeName/ara/official": "المملكة المغربية",
        "name/nativeName/ara/common": "المغرب",
        "name/nativeName/ber/official": "ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⵖⵔⵉⴱ",
        "name/nativeName/ber/common": "ⵍⵎⴰⵖⵔⵉⴱ",
        "tld/1": "المغرب.",
        "currencies/MAD/name": "Moroccan dirham",
        "currencies/MAD/symbol": "د.م.",
        "languages/ara": "Arabic",
        "languages/ber": "Berber",
        "gini/2013": 39.5
    }
]
Code language: JSON / JSON with Comments (json)