Code snippets Gist in comments. The JSON file is where the data is being pulled from and into the tsx file.
As you can see, the currentFolder value is using state and is currently holding a value of "experience" as that's the first item in the info object in "developerConfig.about.sections.professional-info.info". This value is printing to the console just fine and is displaying in the first H1 just fine too. However, when i try to use it dynamically in the second H1 when calling the description value in "developerConfig.about.sections["professional-info"].info["experience"].title" it all falls apart.
The error message is as follows:
Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ experience: { title: string; description: string; }; "hard-skills": { title: string; description: string; }; "soft-skills": { title: string; description: string; }; }'.
No index signature with a parameter of type 'string' was found on type '{ experience: { title: string; description: string; }; "hard-skills": { title: string; description: string; }; "soft-skills": { title: string; description: string; }; }'.
As a TypeScript and Next.js newbie I don't know if this is a TypeScript issue or a Next.js issue. AI has been no help, I've tried their suggestions of adding interfaces and declaring types but since im new, i dont know if im doing it wrong.
Where am i going wrong here?