How to import data from a json file? I am trying to import 10k articles

Here you are doing foreach for the Keys(Keys, if it is an Object, and Index if it is an array). So the entry, in this case, is not an object.

That’s the correct approach

Object.keys(data).forEach((entry) => {
    strapi.services.post.create({
      title: data[entry].title._text,
    });
  });

I would recommend studying a little bit about Object and his prototypes. That would help to avoid a future error like this one.