winglang/wing

can't set a dynamic json key

Open

#5.917 geöffnet am 12. März 2024

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (214 Forks)github user discovery
good first issue🐛 bug🛠️ compiler

Repository-Metriken

Stars
 (5.385 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I tried this:

let url = "http://example.com";

let x= Json{
  "{url}": "valid"
};

log("{Json.stringify(x)}");

This happened:

{"{url}":"valid"}

the key isn't set correctly to the value of url

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.

Contributor Guide