Dyalog APL: How to filter an array like filter() but more weakness

  Kiến thức lập trình

How to change the solution from the answer to the question Dyalog APL: How to filter an array like filter()
To:

  1. it performed an incomplete match search
  2. ignoring the case

Original solution:

   tmpSymbolsT←(data←⎕JSON(HttpCommand.Get'api.binance.com/api/v3/exchangeInfo').Data).symbols
      tmpSymbols←{(⍵.status∊⊂'TRADING')⌿⍵}tmpSymbolsT
      tmpSymbols[1]
   #.[JSON object].[JSON object]

It’s required to filter by: “adin”, “trade”, “ADIn”, “ADING” instead of ‘TRADING’

LEAVE A COMMENT