mledoze / countries

World countries in JSON, CSV, XML and Yaml. Any help is welcome!

Home Page:https://mledoze.github.io/countries/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When customising the output the field "callingCodes" is excluded

BenJackGill opened this issue · comments

I am running this custom output command: php countries.php convert --include-field=name --include-field=cca2 --include-field=callingCodes

But only name and cca2 are included in the output. callingCodes field is always excluded.

Update: If you want callingCodes then you need to use --include-field=idd. The output will then have both idd and callingCodes fields automatically included. It seems you cannot just get callingCodes alone.

For example, my previous command would be php countries.php convert --include-field=name --include-field=cca2 --include-field=idd

If this is the intended behaviour I suggest updating the readme doc to reflect that.

Hi,

I think this is an unintended consequence of #389. I will look into it.

@BenJackGill I have prepared a fix for this here #487, which will be released in the 5.0 version.

Thank you for your patience.