Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SELECT statement does not work properly #51

Open
yasuhisa-hiraga opened this issue Oct 15, 2021 · 3 comments
Open

SELECT statement does not work properly #51

yasuhisa-hiraga opened this issue Oct 15, 2021 · 3 comments

Comments

@yasuhisa-hiraga
Copy link

yasuhisa-hiraga commented Oct 15, 2021

Hi,
When I tried to select from a json object, it didn't work properly.
Am I doing it wrong?
Sorry to trouble you, but please try the following flow.
version is 2.0.1

[{"id":"9710bc666e27f8ca","type":"alasql","z":"89cdb3c1eff17690","name":"SELECT","query":"-- SELECT * FROM ? WHERE age >= 17;\nSELECT * FROM ?","x":300,"y":1060,"wires":[["7dbd635df236fddb"]]},{"id":"7cec6519f9bab538","type":"inject","z":"89cdb3c1eff17690","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"name\":\"ken\",\"age\":19},{\"name\":\"rei\",\"age\":18}]","payloadType":"json","x":130,"y":1060,"wires":[["9710bc666e27f8ca"]]},{"id":"7dbd635df236fddb","type":"debug","z":"89cdb3c1eff17690","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":1060,"wires":[]}]
@mathiasrw
Copy link
Member

What are you selecting?

@yasuhisa-hiraga
Copy link
Author

I wanted to display the list.

スクリーンショット 2021-10-18 10 53 11

スクリーンショット 2021-10-18 10 53 50

スクリーンショット 2021-10-18 10 53 57

スクリーンショット 2021-10-18 10 54 05

スクリーンショット 2021-10-18 10 52 24

@bakman2
Copy link

bakman2 commented Jun 17, 2023

This issue is still valid.

input: array of objects

select * from ?

output only returns the first element in the array split up by property, in groups of 2

Input:
SCR-20230617-rkro

output:
SCR-20230617-rktx

What am i missing ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants