# Array shorthand syntax question

**URL:** <https://forum.kirupa.com/t/array-shorthand-syntax-question/255061>\
**Category:** flash\
**Created:** [March 18, 2008, 5:44pm UTC](https://forum.kirupa.com/t/array-shorthand-syntax-question/255061 "2008-03-18T17:44:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DirtyBirdNJ](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@DirtyBirdNJ](https://forum.kirupa.com/u/DirtyBirdNJ)\
**Post date:** [March 18, 2008, 5:44pm UTC](https://forum.kirupa.com/t/array-shorthand-syntax-question/255061/1 "2008-03-18T17:44:54Z")

</div>

Hello everybody. I’m currently working on an Adobe AIR app that will manage inventory for a small company. It uses an SQLite database to store all the data… and my problem is not with getting the queries to work. I’ve been studying the code from the SQLite Admin program written by [Christophe Coenraets](http://coenraets.org/blog/). I wish I could have found an email address on his website, I would have asked him about this, since he wrote the code in the first place! Here’s a link to his app.

[http://coenraets.org/blog/2008/02/sqlite-admin-for-air-10/](http://coenraets.org/blog/2008/02/sqlite-admin-for-air-10/)

Anyway, here’s the code I can’t figure out.

```auto
var data:Array = result.data is Array ? result.data : [{rows: result.rowsAffected}];

```

The var result is a SQLResult object, and the query it runs (select \* from table) returns rows as it should. I tried looping over result.data to make an ArrayCollection to populate a DataGrid with… but my code won’t work.

Could somebody explain WTF is going on with the **IS** keword, the question mark, and the curly brackets INSIDE square brackets?! I can’t find anything documenting this syntax online and it’s driving me nuts.
