Cannot insert data loaded from toml file

You are running into a similar situation addressed here:

In your case, for each of the context language.get(). ... parts, the context at the beginning means that the result will always be of type content. The solution will probably include defining this sections variable within a known context and using it directly afterwards:

#context {
  let sections = (language.get().sections.actions, /*lots more*/)

  for section in sections {
    if section in stats.keys() {
      //...
    }
  }
}

Something you will run into right away is that the section variable will not be available outside of the context that it is defined within.

2 Likes