-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unique data to src/data.json #23
Comments
Could you please elaborate? What unique data are we talking about? |
Not exactly sure what you mean by unique data but if you mean add another property to each object below is a function that you could use to easily add data into the json data. I just required it in as jsonObj for testing purposes. Hope this helps! const jsonObj = require('./clonedJSON');
function addUniqueData(arr) {
// loop through the jsonObj
for (let i = 0; i < arr.length; i++) {
// add unique data to each country object
arr[i].uniqueData = i + 'xyz';
}
return arr;
}
console.log(addUniqueData(jsonObj)); |
@sanilborkar as @pswartz66 rightly prompted, by unique data I mean , data that is unique to every country and it doesn't changes with time. for example: Land area, capital etc.. a wrong example would be population (since it changes with time, its variable) |
Thanks @pswartz66 ! I' ll definitely use this helper function! Appreciate it! |
|
@sudo-kaizen yes, this will be considered as unique data. For countries like England just add the string : 'N/A' |
Is this issue still open? |
@faraz16iqbal yes it is. |
issue #23 add drive direction to the countries as unique data
Would you consider popular tourist attractions as Unique ? E.g France: ['Eiffel Tower'],
India: ['Taj Mahal', 'Qutub Minar'], |
@ccsCoder yea sounds good |
Hi @bhatvikrant , i have modified the famous for fields in the data for the following countries , syria, turkey, austria and sweden. Do check . |
Hi @bhatvikrant, Added a unique property timezone to data.json #64 |
Since we have #32 Issue opened, there is no reason for having this one as well. So for now lets stick to one issue opened. On the other hand, I think we should have separate Issues created for each bug/feature, so the discussion is clear. |
No description provided.
The text was updated successfully, but these errors were encountered: