Lottie-web: How to Replace Json file path by Json content

Created on 26 Nov 2018  路  2Comments  路  Source: airbnb/lottie-web

How do I replace JsonFile name by JsonContent in loadAnimation(),
Ex:
var anim = lottie.loadAnimation({
container: document.getElementById('dome'),
renderer: 'svg',
loop: false,
autoplay: false,
path: 'fileName.json' -> here I want to set something like this
data: '{JSON Object}' });
Please guide for the same or give me some alternative so that I can set JsonObject directly instead of JsonFile Path.

Most helpful comment

use 'animationData' instead of 'path' and pass it as an object, not a string

All 2 comments

use 'animationData' instead of 'path' and pass it as an object, not a string

Hi,
Thanks for the support and this awesome plugin...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jumostudio picture jumostudio  路  3Comments

processprocess picture processprocess  路  3Comments

joelponce picture joelponce  路  4Comments

ochanje210 picture ochanje210  路  3Comments

leantide picture leantide  路  3Comments