Candidate Information

Name

Sajeewan
Sathiyanathan

Email

sathiyanathansajeewan3@gmail.com

Mobile

0769920268

date of Birth

March 15, 2002

Are you willing to move to Muscat - Oman?

Yes

Monthly Salary Expectation

USD 500.00

Available to Join

Within a Month

Review CV

Candidate Skills

Work Experience

Internship

Development skills

PHP
HTML
CSS
GitHub
Python

Javascript object array

				
					var url = `http://localhost:8080/list?emp[0].id=21&emp[0].name=john&emp[1].id=22&emp[1].name=tom`;
var data = url.split('?')[1].split('&');

var result = Object.values(data.reduce((acc, elem)=>{
   key = elem.match(/d+/)[0];
   kv = elem.split(".")[1].split('=');
   acc[key] = {...(acc[key] || []), ...{[kv[0]]:kv[1]}}
   return acc;
},{}));

console.log(result);
				
			

RestAPI

				
					var url = `http://localhost:8080/list?emp[0].id=21&emp[0].name=john&emp[1].id=22&emp[1].name=tom`;
var data = url.split('?')[1].split('&');

var result = Object.values(data.reduce((acc, elem)=>{
   key = elem.match(/d+/)[0];
   kv = elem.split(".")[1].split('=');
   acc[key] = {...(acc[key] || []), ...{[kv[0]]:kv[1]}}
   return acc;
},{}));

console.log(result);