Question: I have tried googling but couldn't get any information to echo a record from specific table while I generate the query using JOIN. 

Here's my code:

```
SELECT * FROM tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id

```

I want to get the `id` from `tbl1`. When I used,

```
echo $row->id

```

It does echo the `id` column from `tbl2`. What should I do to get the record from the table which I want? Thanks!

Answer: 
Ok, from your responses in the comments. I think I have enough info to write the answer assuming that json[i] is an array of strings:

```
var tresult = _.filter(result, function(obj) {
    return _(obj.boardingPoints).map('location').intersection(json[i]).value().length > 0
        || _(obj.droppingPoints).map('location').intersection(dpLocations).value().length > 0
        || _.includes(busTypes, obj.busType)
        || _.includes(operatorNames, obj.operatorName);
});

```

You can assign the expression to a variable but I think there isn't any real benefit in this case. However, if you really insist on assigning the expression to a variable, leave it as an expression, convert it to a string would not work. Here is the code where the 1st expression is assigned to a variable:

```
var tresult = _.filter(result, function(obj) {
    var st = _(obj.boardingPoints).map('location').intersection(json[i]).value().length > 0;

    return
        st || _(obj.droppingPoints).map('location').intersection(dpLocations).value().length > 0
        || _.includes(busTypes, obj.busType)
        || _.includes(operatorNames, obj.operatorName);
});  

```
Look at syntax highlighting you're trying to use single quote inside single quote. Try this:

```
var st='_(obj.boardingPoints).map("location").intersection("'+json[0]+'").value().length > 0'

```