Linked Questions

Popular Questions

How to ignore node null in json in Pentaho

Asked by At

I have a json like this:

{
    users:[
    {
        name: 'Jonh Smith'
        address: {
            province: 'Thanh Hoa',
            district: 'Tp Dong Son',
            ward: 'Dien Bien',
            raw_address: 'No 14'
        }
    },  
    {
        name: 'Taylor Sweet'
        address: {
            province: 'Thanh Hoa',
            district: 'Tp Dong Son',
            ward: 'Dien Bien',
            raw_address: 'No 14'
        }
    },
    {
        name: 'Athlee Bans'
        address: null
    }]
}

I used Json Input in Pentaho to get data. [![enter image description here][1]][1]

But you can see, Athlee Bans's address is null. So when get data, I meet an error:

The data structure is not the same inside the resource! We found 1 values for json path [$.users[*].address.province], which is different that the number returned for path [$.users[*].name] (3 values). We MUST have the same number of values for all paths.

I have cheked ignore missing path on Content Tab: [![enter image description here][2]][2]

So how to ignore this error and have full data? Thanks! [1]: https://i.stack.imgur.com/bjbIw.png [2]: https://i.stack.imgur.com/VmlLr.png

Related Questions