Question: ```
var state = Vue.observable({
    selectedTab: ''
});

Vue.component('block-ui-tab', {
    props: ['name', 'handle', 'icon'],
    template: '<li :handle="handle" :class="{ active: state.selectedTab === handle }"><i :class="icon"></i>{{ name }}</li>'
});

var app = new Vue({
    el: '#app',
    data: {},
    methods: {},
    computed: {},
    watch:{},
    mounted: function(){},
});

```

This doesn't work, so I'm wondering how to use the observable in the component and the vue root instance? Pass it as a prop, or?

Answer: 
First, I think you can use any serializer to convert your objects to the format you want.

```
var serialized = JsonConvert.SerializeObject(data)

```

Second, back to your question, here is the code. However, you need to add " around your variables and get rid of string concatenation I added for readability. Also, this code is so specific to your problem and for more generic solution go for the first approach. 

```
var mainData = string.Join(',', data.Select(x => $" {{ {nameof(x.Id)} :  {x.Id}, " +
                                                           $"{nameof(User)}s: " +
                                                           $"[ {string.Join(',', x.Users.Select(y => $"{{ {nameof(User.T_Id)} : {y.T_Id} }}"))}]" +
                                                           $"}}"));
var result = $"[{mainData}]" ;

```

As you changed the question, I updated my answer. So, you need to first join someView and user to get them together and then group by someView.id. Here is the code

```
        var someViewsUsersJoin = someViews.Join(users, l => l.t_id, r => r.t_id, (someView, user) => new {someView, user});

        var result = someViewsUsersJoin.GroupBy(x => x.someView.id).Select(x => new SomeViewModel()
        {
            Id = x.Key,
            Users = x.Select(y => y.user).ToList()
        });

```
Finally Resolved it this way - 

```
 public class SomeView
{
   public int Id {get; private set;}
   public int T_Id { get; private set; }

}

public class User
{
   public int T_Id { get; set; }
   public string fname {get; set;}
   public string lname{get; set;}
}

public class SomeViewModel
{
   public int Id { get;  set; }
   public List<User> Users{get; set;}
}

   from t in SomeView
   join u in User on v.T_Id equals u.T_Id
   group new {t, u} by t.Id into grp
   select new SomeViewModel{
      Id = grp.Key,
      Users = grp.Select(x => x.u).ToList()
  }

```

That was easy :)