Candidate Information

Name

Nuwan
Sampath

Email

nuwanliyanamana1996@gmail.com

Mobile

0767987757

date of Birth

November 13, 1996

Are you willing to move to Muscat - Oman?

Yes

Monthly Salary Expectation

USD 3,500.00

Available to Join

Within a Month

Review CV

Candidate Skills

Work Experience

Work
1-3

Development skills

PHP
HTML
CSS
Javascript
React Native
GitHub
RestAPI
JSON / XML

Javascript object array

				
					const url = new URL('https://yourdomain.com/products/?add-products%5B0%5D%5Bproduct-id%5D=16&add-products%5B0%5D%5Bquantity%5D=5&add-products%5B0%5D%5Bprice%5D=25.000&add-products%5B1%5D%5Bproduct-id%5D=17&add-products%5B1%5D%5Bquantity%5D=7&add-products%5B1%5D%5Bprice%5D=84.000&add-products%5B2%5D%5Bproduct-id%5D=15&add-products%5B2%5D%5Bquantity%5D=10&add-products%5B2%5D%5Bprice%5D=100.000&product-name=0&quantity=0&price=0&object_id=31');

const obj2 = Object.fromEntries(new URLSearchParams(url.search));
console.log(obj2);
				
			

RestAPI

				
					const url = new URL('https://yourdomain.com/products/?add-products%5B0%5D%5Bproduct-id%5D=16&add-products%5B0%5D%5Bquantity%5D=5&add-products%5B0%5D%5Bprice%5D=25.000&add-products%5B1%5D%5Bproduct-id%5D=17&add-products%5B1%5D%5Bquantity%5D=7&add-products%5B1%5D%5Bprice%5D=84.000&add-products%5B2%5D%5Bproduct-id%5D=15&add-products%5B2%5D%5Bquantity%5D=10&add-products%5B2%5D%5Bprice%5D=100.000&product-name=0&quantity=0&price=0&object_id=31');

const obj2 = Object.fromEntries(new URLSearchParams(url.search));

//javascript
var xhttp = new XMLHttpRequest();
xhttp.open("POST", "ajaxfile.php", true); 
xhttp.setRequestHeader("Content-Type", "application/json");
xhttp.onreadystatechange = function() {
   if (this.readyState == 4 && this.status == 200) {
     var response = this.responseText;
   }
};
xhttp.send(JSON.stringify(obj2));


//jquery Ajax
$.ajax({
   url: 'ajaxfile.php',
   type: 'post',
   data: obj2,
   success: function(response){
       console.log(response);
   }
});