-
For example: [
{ "id": 1, "name": "Item 1" },
{ "id": 2, "name": "Item 2" },
{ "id": 3, "name": "Item 3" },
] And how to recive it? Like this? <div data-signals="{ myJsonArray: [] }">
<ul>
<li data-for="item in myJsonArray" data-text="item.name"></li>
</ul>
</div> |
Beta Was this translation helpful? Give feedback.
Answered by
bencroker
Feb 7, 2025
Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bencroker
-
I have read guide and docs but somehow thought that it should be possible
but just couldn't find it.
Maybe this scenario should be better descibed as not supported in the docs?
pt., 7 lut 2025, 14:28 użytkownik Ben Croker ***@***.***>
napisał:
… data-for is not a Datastar attribute, and sending JSON from the backend
is not supported. Please read the guide and docs
<https://data-star.dev/guide> to see what Datastar can do, before trying
to use features that don’t exist.
—
Reply to this email directly, view it on GitHub
<#625 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAHA42A2HRWWNIE2UACR332OSYGNAVCNFSM6AAAAABWVVW4EOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBZGQZTKMA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
data-for
is not a Datastar attribute, and sending JSON from the backend is not supported. Please read the guide and docs to see what Datastar can do, before trying to use features that don’t exist.