I have the following code:
const result = JSON.stringify({
drivingLicence: {
documentNumber: '3333',
countryOfIssue: 'UNITED_KINGDOM',
regionOfIssue: 'UK'
},
mothersMaidenName: 'AAAAA',
nationalIdentityCard: {},
nationalInsuranceNumber: 'NW 26 52 66 A',
passport: {}
},(key, value) =>{
console.log(typeof key + ' ' + key);
return value;
});
I get this output:
console.log src/components/Submission/submissionTransformer.test.js:31
string
console.log src/components/Submission/submissionTransformer.test.js:31
string drivingLicence
console.log src/components/Submission/submissionTransformer.test.js:31
string documentNumber
console.log src/components/Submission/submissionTransformer.test.js:31
string countryOfIssue
console.log src/components/Submission/submissionTransformer.test.js:31
string regionOfIssue
console.log src/components/Submission/submissionTransformer.test.js:31
string mothersMaidenName
console.log src/components/Submission/submissionTransformer.test.js:31
string nationalIdentityCard
console.log src/components/Submission/submissionTransformer.test.js:31
string nationalInsuranceNumber
console.log src/components/Submission/submissionTransformer.test.js:31
string passport
I do not understand where the first output is coming from.
It says the key is an empty string. Where is this coming from?