# Technical Interview Round 1 Instructions: - Time: 1 hour - Any two (2) Questions - Tools: VSCode, NodeJS, Mongo - Points to Score: Eleven (11) pts - Bonus points for clean, minimal, optimized lines of code. --- # Technical Question 1 (3 pts) Write a function which modifies the keys in the given object. ## Sample Input: ```javascript { "account-provider": "abc", "aggrID": "xyz", "amount": "1.00", "channel-code": "123", "corpID": "abc123", "default-credit": "N", "default-debit": "N", "device-id": "190160190160190160190160", "mcc": "6011", "merchant-type": "ENTITY", "mobile": "7000000023", "payee-name": "MEHUL", "payee-va": "abc@xyz", "payer-va": "xyz@pqr", "pre-approved": "y", "profile-id": "2995692", "remarks": "none", "seq-no": "5DC866EA6ADC427", "txn-type": "W", "use-default-acc": "D", "userID": "abc123xyz" } ``` ## Expected Output: ```javascript { aggrID: 'xyz', amount: '1.00', corpID: 'abc123', mcc: '6011', mobile: '7000000023', remarks: 'none', userID: 'abc123xyz', account_provider: 'abc', channel_code: '123', default_credit: 'N', default_debit: 'N', device_id: '190160190160190160190160', merchant_type: 'ENTITY', payee_name: 'MEHUL', payee_va: 'abc@xyz', payer_va: 'xyz@pqr', pre_approved: 'y', profile_id: '2995692', seq_no: '5DC866EA6ADC427', txn_type: 'W', use_default_acc: 'D' } ``` --- # Technical Question 2 (5 pts) Write a nodejs/express server which has following APIs ## Create User POST `/user` ```javascript { "username":"rajat", "password": "abcxyz" "idType":"AADHAR", "idNumber": "123456789123" } ``` it returns, ```javascript { "_id":"01", "username":"rajat", "password": "******" "idType":"AADHAR", "idNumber": "********9123" } ``` ## Fetch User GET `/user/:id` it returns ```javascript { "_id":"01", "username":"rajat", "idType":"AADHAR", "idNumber": "********9123" } ``` --- # Technical Question 3 (7 pts) Write a nodejs/express server which has following APIs ## Create User POST `/user` ```javascript { "name":"rajat" } ``` it returns `_id` ```javascript { "_id":"233232323232" } ``` ## Create Product POST `/product` ```javascript { "product_name":"laptop123", "user_id":"233232323232" } ``` it returns `_id` ```javascript { "_id":"123123123" } ``` ## Fetch User GET `/user/:id` ```javascript { "name":"rajat", "products":[{, "product_id":"123123123", "user_id":"233232323232", "product_name":"laptop123" }] } ``` ---