JSFiddle - React, Tailwind, and code Playground
by diode
JavaScript
arr1 = [{"link":"#","prod":"Fundamentals Of Software Engineering","price":" Rs. 200 "},{"link":"##","prod":"Real-Time Systems: Theory And Practice","price":" Rs. 394 "}];
arr2 = [{"link":"#","prod":"Fundamentals Of Software Engineering","price":" Rs. 200 "},{"link":"##","prod":"Real-Time Systems: Theory And Practice","price":" Rs. 394 "}];
arr3 = [{"link":"#","prod":"Fundamentals Of Software Engineering","price":" Rs. 200 "},{"link":"##","prod":"Real-Time Systems: Theory And Practice","price":" Rs. 394 "}] ;
var mergedArray = arr1.concat(arr2, arr3);
var sorted = mergedArray.sort(function(a, b){
var priceA = parseFloat(a.price.replace("Rs.", ""));
var priceB = parseFloat(b.price.replace("Rs.", ""));
return priceA - priceB;
});
console.log(sorted);