Maybe someone else will chime in, but I'm guessing you'll probably want to serialize it with something like Newtonsoft.Json, pass it as a string, then deserialize it in the JavaScript file with JSON.parse().
Here's a blog post by Chris Sainty about working with JavaScript Interop, in case it helps: https://chrissainty.com/using-javascript-interop-in-razor-components-and-blazor/
Posted 3 years ago
by selliott