A vue components for compare JSON data

vue-json-compare

vue(2.x) json compare components.

Install

npm install --save vue-json-compare

Usage

<template>
  <div>
    <vue-json-compare :oldData="oldData" :newData="newData"></vue-json-compare>
  </div>
</template>
import vueJsonCompare from 'vue-json-compare'

export default {
  components: {
    vueJsonCompare
  },
  data () {
    return {
      oldData: {
        a: 1,
        e: 0
      },
      newData: {
        a: 2
        b: 3
      }
    }
  }
}

Props

Attribute Level Description Type Default
oldData basic json data JSON object or object Array, {...}, [{...}, {...}] -
newData basic json data JSON object or object Array, {...}, [{...}, {...}] -

GitHub