Untitled
unknown
plain_text
a month ago
6.2 kB
1
Indexable
Never
test@gmail.com { "field": { "id": "zVmmGTkoe1SH", "type": "multiple_choice", "ref": "fd669da3-bc01-4af3-8b06-143b0e9208ad" }, "type": "choice", "choice": { "id": "YaV0ygr3KgNi", "ref": "51a35d1e-00aa-4a34-823b-0a7fcb27e1b8", "label": "I Know My Hourly Wage" } }, { "field": { "id": "MvM17ZdIZypV", "type": "short_text", "ref": "e11c2e00-a168-4c4f-835f-66a0a2a18137" }, "type": "text", "text": "50" }, { "field": { "id": "eDr8LnXXGPw6", "type": "short_text", "ref": "3dddeb65-eb31-402c-ad52-05517abdcd52" }, "type": "text", "text": "40" }, ovesh@mailinator.com { "field": { "id": "zVmmGTkoe1SH", "type": "multiple_choice", "ref": "fd669da3-bc01-4af3-8b06-143b0e9208ad" }, "type": "choice", "choice": { "id": "vUh6soI0nYGu", "ref": "3cd0ab03-15e7-4861-82e2-52270d402c59", "label": "I Know My Annual Income" } }, { "field": { "id": "tPZbKHkgFlV4", "type": "short_text", "ref": "545a0bdd-f053-4e94-9c6a-d95cd76aa4ab" }, "type": "text", "text": "350000" }, vishi@gmail.com { "field": { "id": "zVmmGTkoe1SH", "type": "multiple_choice", "ref": "fd669da3-bc01-4af3-8b06-143b0e9208ad" }, "type": "choice", "choice": { "id": "nOswZSW1CkoL", "ref": "5fec5f29-6988-480d-9598-492f936338e2", "label": "I Know My Monthly Income" } }, { "field": { "id": "P9t55LNBtfc1", "type": "short_text", "ref": "04206c99-bf7d-482c-a1ca-afc1172aefa1" }, "type": "text", "text": "1000" }, test@gmail.com { "field": { "id": "zVmmGTkoe1SH", "type": "multiple_choice", "ref": "fd669da3-bc01-4af3-8b06-143b0e9208ad" }, "type": "choice", "choice": { "id": "eop9xGm3UktC", "ref": "fd46d8f9-3eb8-4415-9790-577b2b715a37", "label": "I Know The Amount of My Last Pay" } }, { "field": { "id": "gycE7Y1qFlMf", "type": "short_text", "ref": "b3a2e732-e3a2-4932-92c1-80a87bb01b40" }, "type": "text", "text": "3000" }, { "field": { "id": "1jZJL7PQr2vN", "type": "multiple_choice", "ref": "17aa58b9-67dd-4403-aec6-71130403b6c5" }, "type": "choice", "choice": { "id": "L6WmFZdz3CyP", "ref": "6f0a3441-00db-47bb-a50a-004be0030ead", "label": "Weekly" } }, I have code [this.dataDetail] = data.items.map((response: any) => { const answerMap = response.answers.reduce((acc: any, answer: any) => { acc[answer.field.ref] = answer[answer.type]; return acc; }, {}); return { EntryId: response.response_id, //response_id DateCreated: response.submitted_at, //submitted_at Field9: answerMap['01HV4H85YYBR3A8P3H61S7S357'], //Email Address Field662: answerMap['831be802-29b2-4ef8-bbe4-0ed61f12fa66'], //first_name Field661: answerMap['bad7e25d-a8d3-4e87-ad6a-2f07e3689b71'], //last_name birthDate: answerMap['0887bbb5-0a00-4db5-9310-dd6f88710e94'], //Birthdate phoneNumber: answerMap['34bec685-ead2-42fb-b7e7-9a2649558bc8'], //phoneNumber province: answerMap['0ed5f9fc-964c-4f79-971a-f401aee49973'], //province address: answerMap['303214d6-b99d-4bb6-8230-515e0fa95e3f'], //address city: answerMap['e3739d19-9f0e-4a1d-a914-93252f77d1a8'], //city postalCode: answerMap['51b652ec-a1ab-47e4-93d2-ffc2d4aa2167'], //postalCode isCurrentCustomer: answerMap['44cf5f46-a213-4371-a7ef-905537bbdbcd'], //currentCustomer Field763: answerMap['173565ef-ddfd-4059-a646-f3b77579afb9'].label, //loan ammount creditScore: answerMap['8aa1dced-72de-4857-af99-7a34c70a02e8'].label, //creditScore employementStatus: answerMap['e246c765-893a-4f5a-8bea-af941968bdc4'].label, //employementStatus incomeDetails: answerMap['fd669da3-bc01-4af3-8b06-143b0e9208ad'].label, //incomeDetails monthlySalary: answerMap['04206c99-bf7d-482c-a1ca-afc1172aefa1'], //monthlySalary howLongRecievinIncome: answerMap['4b7e10f5-900f-4df6-a9a7-936e05b7a16c'], //howLongRecievinIncome employerName: answerMap['1a0f88e1-82d2-48be-afbb-6ffd09e28c11'], //employerName sinNumber: answerMap['4becf5f4-11b6-4b88-a8a1-d16498823949'], //sinNumber isOwnMotor: answerMap['8a386e7e-89ab-44fd-9742-922370f79332'], //ownMotor make: answerMap['b80dcd5e-aa1f-43c1-b701-1223a9daa3cd'], //make year: answerMap['1cb44671-1cd7-419b-8eae-59eabd2634a6'] || answerMap['c22a427a-1340-400f-806a-6e2db87b2d3c'], //year model: answerMap['2d5c7ea5-ae95-46d5-9446-18d38f540e14'], //model isFinanced: answerMap['7c3e1ba3-bf2c-413d-a95b-e6f205d83dad'], //isFinanced financialInstitution: answerMap['c683f55a-295d-49bd-8ca3-9e3763ce6f77'], //financialInstitution isCurrentlyInsured: answerMap['c73b5cfc-fada-4282-a90c-5d82dbff842b'], //currentlyInsured isCurrenlyRegisterVehical: answerMap['0447aaaa-a9c4-4174-bb4a-6919092ac5ef'], //currenlyRegisterVehical coApplicantFullName: answerMap['a0d860f4-cde3-4c62-b599-7597b334fcf4'], //coApplicantFullName coApplicantEmailAddress: answerMap['e5cac70f-3fa8-4db1-8da3-a3fd08f0390e'], //coApplicantEmailAddress }; }); now I want to print monthlySalary in vidhi@gamil I got correct value but in other data I got 0 can u please help me out I want to calculate and return monthly income as per this condition and value
Leave a Comment