Forum Discussion

ayush_vipul's avatar
ayush_vipul
New Contributor III
7 years ago

Adding javascript libraries

Hi folks,
I am trying to add crypto js Library in my js script.

Can you suggest me a way to import js libraries into js in snaplogic.

3 Replies

  • Supratim's avatar
    Supratim
    Contributor III

    vfantidou  Please use below expression-. From your example seems there are some typo (2nd record in input0 should have ID not ID_NUMERIC). If it's not typo you need make null safe in mapper.

    input0.filter((val,index)=> $filterData.find((ele)=> ele['ID'] ==val['ID'] ) != null )

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    Try this expression: 

    $input0.filter((elem) => $filterData.find(x => elem.ID == x.ID))

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    vfantidou 

    Try with this expression: 

    $input0.filter((elem) => $filterData.find(x => elem.ID == x.ID))

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    vfantidou 

    Try with below expression: 

    $input0.filter((elem) => $filterData.find(x => elem.ID == x.ID))