Question: I'm trying run a script if URL doesn't contain specific string. Here is what i have so far:

```
var ignorePages = ['page1','page2','page3'];

if (window.location.href.indexOf($.inArray(ignorePages)) === -1) {
    // do something
}

```

But this is not working. I would like to test if the string is found in array and if not, execute. Searched the SO Q/A but couldnt find a solution via array using jQuery's `inArray`.

Answer: 
AsyncStorage return a promise. you can use .then for get value

exemple:

```
AsyncStorage.getItem('key').then((keyValue) => {
  console.log(keyValue) //Display key value
  }, (error) => {
  console.log(error) //Display error
});

```
Looking [at the docs](https://facebook.github.io/react-native/docs/asyncstorage.html) you should be able to do this reliably to retrieve data from your async storage object.:

```
try {
  const value = await AsyncStorage.getItem('@MySuperStore:key');
  if (value !== null){
    // We have data!!
    console.log(value._65);
  }
} catch (error) {
  // Error retrieving data
}

```

you must use this within a function that is `async` however or you will get a runtime exception.