title: Vue.js2 - Array contains __ob__ : Observer
body: <p>(Probably) a beginners question regarding vue.js. I'm trying to display Data using the CanvasJS Library received via websocket. Working with the data works fine until I start using vue components. To make myself clearer:</p>
  
  <pre><code>export default {
    data() {
      return {
        cartesian: null,
        ws: null
      }
    },
  
    methods: {
  
      fillData(res) {
       var data = JSON.parse(res.data)
  
       var buffer = data.mdi
       console.log(buffer)
  
       this.cartesian = data.mdi
       console.log(this.cartesian)
      }
  
    },
  
    mounted() {
      this.ws = new WebSocket('ws://localhost:1111')
      this.ws.onmessage = this.fillData
    }
  }
  </code></pre>
  
  <p>The line <code>console.log(data.mdi)</code> outputs <code>{0: Array(256), 1: Array(256), 2: Array(256), 3: Array(256)}</code>. This is exactly what I'm expecting and what works with CanvasJS.<br>
  The line <code>console.log(this.cartesian)</code> however outputs <code>{__ob__: Observer}</code>. A far as I understand, this has to do with the reactiveness of vue.js. Unfortunately I cannot use the contents of <code>this.cartesian</code> with CanvasJS because it does not show any data.<br>
  As I don't see any other way to display my data other than using <code>this.cartesian</code> I'm hoping for help regarding what I might be doing wrong here or how to access the data in <code>this.cartesian</code> as I can see its there when inspecting it in my browser.</p>