PricingBlog

Cannot get fromEntries to work

  • mbirkegaard-1200159276073758770

    mbirkegaard

    1 year ago

    I'm assuming the from entries formula would like this?
    const obj = Object.fromEntries([
    ['foo', 'bar'],
    ]);

    > Object { foo: "bar" }


    However when I try this, I get a rather funky looking output
    1200159276342190220-Screenshot_2024-01-25_at_20.19.54.png
    1
  • Tod-1200159279181729812

    Tod

    1 year ago

    Great energy @mbirkegaard! Your continuous contribution to the toddle Community just made you advance to Community Level 3!
  • andreasmoller-1200159607079837747

    Andreas Møller

    1 year ago

    From entries is not an exact copy of the JavaScript version
    It takes an array of objects
  • Use “entries” to see the output, it is the reverse of that
  • mbirkegaard-1200170746421444739

    mbirkegaard

    1 year ago

    Ah. Thanks!
  • mbirkegaard-1200367805770502186

    mbirkegaard

    1 year ago

    Could you improve the little doc popup to be more clear about this?
  • andreasmoller-1200367949681266789

    Andreas Møller

    1 year ago

    👍