I have two json data
var orders = [
{seller: "Test1", sell_count: 5, sell_amount: 1500},
{seller: "Test2", sell_count: 2, sell_amount: 7500}
];
var views = [
{seller: "Test1", pc_view: 123, mobile_view: 87},
{seller: "Test2", pc_view:56, mobile_view:23},
{seller: "Test3", pc_view: 13, mobile_view:7}
];
using linq.js how to join like below
result = [
{seller: "Test1", view_count : 210, sell_count: 5, sell_amount: 15000},
{seller: "Test2", view_count : 79, sell_count: 2, sell_amount: 7500},
{seller: "Test3", view_count : 20, sell_count: 0, sell_amount: 0}
]
please help me!
There isn't a builtin way to perform a full outer join so you'll have to replicate it. There's many ways this could be achieved, here's one.