I have such array:
homeShapeShift: [
[
{text:"BTC", callback_data: 'btc'},
{text:"ETH", callback_data: 'eth'},
{text:"XRP", callback_data: 'xrp'},
{text:"ETC", callback_data: 'etc'},
],
[
{text:"ZEC", callback_data: 'zec'},
{text:"DASH", callback_data: 'dash'},
{text:"LTC", callback_data: 'ltc'},
{text:"OMG", callback_data: 'omg'},
],
[
{text:"ADA", callback_data: 'ada'},
{text:"BTG", callback_data: 'btg'},
{text:"TRX", callback_data: 'trx'},
{text:"NEO", callback_data: 'neo'},
],
]
How to remove object with text Zec and receive new array without it? I tried something with filter but didn't receive good result
let fe = keyboard.homeShapeShift.filter(k => k.filter(e => e.text !== 'ZEC'));
filtertomapand you should be good:keyboard.homeShapeShift.map(k => k.filter(e => e.text !== 'ZEC'));