Right now, the module works, but it doesn't load new data as an anonymous user. And after you refresh the site, it will show the new data. Perhaps, JsonResponse is much better for this project.
I am not sure why it is not showing new data the same as when you update a node from an Article or Content page. It is not doing it dynamically.
Steps to set up the system before you install the Custom Module.
Create a Content Type:
These are the fields:
Body body Text (formatted, long, with summary)
Crop field_mlfruitandnut_crop List (text)
Here is the list:
Cultivar field_mlfruitandnut_cultivar Text (formatted)
field_link_the_site field_link_the_site Text (plain)
Fruit field_mlfruitandnut_fruit Text (formatted)
Origin field_mlfruitandnut_origin Text (formatted)
Tree field_mlfruitandnut_tree Text (formatted)
Add these data to the Content Type you created:
Body: Orig. in Saskatoon, Saskatchewan, Canada, by C.F. Patterson, Univ.
Body: Orig. in Edmonton, Alberta, Canada, by Mrs. J.H. Acheson.
Once you have done that, please download the custom module in your Custom folder or Module folder in Drupal 8.
This is the path to check the data.
Another possibility to fix this problem is using JsonResponse. I have a Custom module and need to add the script and display the data. Let me know if you need that.