How to fetch new data in file 1 (new data) based from file 2 (old data)

I want to filter the new data that is in file 1 (new data) based from file 2 (old data)

File 1 (new data)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
    "itemCount": 11532,
    "items": [
        {
            "name": "Blank",
            "rarity": 1
        },
        {
            "name": "Blank Seed",
            "rarity": 1
        },
        {
            "name": "Dirt",
            "rarity": 1
        },
        {
            "name": "Diamond Lotus Lamp Seed",
            "rarity": 999
        }
    ],
    "itemsdatVersion": 14
}


File 2 (old data)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
    "itemCount": 11532,
    "items": [
        {
            "name": "Blank",
            "rarity": 1
        },
        {
            "name": "Blank Seed",
            "rarity": 1
        },
        {
            "name": "Diamond Lotus Lamp Seed",
            "rarity": 999
        }
    ],
    "itemsdatVersion": 14
}

Exceptations Output :
1
2
3
4
        {
            "name": "Dirt",
            "rarity": 1
        }
Last edited on
What are the issues you have having? Do you know how to read text from a file and write text to a file?

What have you tried so far? Post your current code.

Is what you really want to do is to compare two files and report on the difference(s)?
I've tried it from tutorials and github, but nothing matches what I want,
actually I want to make an application to filter which data is new from file 1 (new data) based on file 2 (old data), both files are in the form of .json
Yes. So you need to write your own program. As I asked above, what issues are you having writing the code? What have you got so far?

If you want someone to write this code for you, then I'd suggest you post in the jobs section.
Topic archived. No new replies allowed.