react admin newrecords.foreach is not a function
snippet in javascript

react admin newrecords.foreach is not a function

user7377

The problem is due to your data sample format, in that case your API respose it is an object, but it need to be an array instead. Like this:

[
     { id: 126, title: "allo?", author_id: 12 },
     { id: 127, title: "bien le bonjour", author_id: 12 },
     { id: 124, title: "good day sunshine", author_id: 12 },
     { id: 123, title: "hello, world", author_id: 12 },
     { id: 125, title: "howdy partner", author_id: 12 }
]