i have two arrays, balances and commits
balances = [
{name: 'vacation', value: ''21},
{name: 'account', value: '200'},
{name: 'order', value: '15'},
]
commits = [
{balanceName: 'vacation', paramName: 'number of days'},
{balanceName: 'order', paramName: 'number of items'}
]
i want to remove form balances what is not in commits, in this example i want to remove account value from balances cause it is not in any of the balanceName of commits how can i do this by underscore or any other library