Monday, June 19, 2023

Re: Using JavaScript to enumerate a dataset returned to a page.

I assume you're referring to the standard called dataset. If so, take a look here:

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset#examples


On June 18, 2023 12:08:26 PM CDT, Lee Stevens <lee@stevensnet.com> wrote:
Helo,

I have a dataset returning to a page.  I need JavaScript to be able to process this.

Instead of using:
{% for item in dataset %}
{{ item.field1 }}
{{ item.field2 }}
{% endfor %}

Is there a JavaScript way to read this dataset/variable instead?

Thanks.

No comments:

Post a Comment