# Example Uses

# Perspective Table Data and Columns Config from Datasets

When using the JSON return format in a Named Query, the column order and original column datatypes are lost. You can move a Named Query binding to a custom property of the component or view, then use this simple iteration expression to deliver the jsonified content to the table:

##### Binding on props.data

```pascal
forEach(
	{path.to.source.dataset.prop},
	asMap(it())
)
```

##### Features Employed

- [Iterables](https://www.automation-pros.com/toolkit/doc/iteration.html#iterables) General behavior of all iterators.
- [forEach()](https://www.automation-pros.com/toolkit/doc/iteration.html#foreach) Loops through the dataset, calling the nested expression with one row at a time.
- [it()](https://www.automation-pros.com/toolkit/doc/iteration.html#it) Delivers the one row in dataset format (same column names and types as the source).
- [asMap()](https://www.automation-pros.com/toolkit/doc/iteration.html#asmap) Converts the first row of the dataset it is given into a mapping (dictionary) of key-value pairs.