JustinCredible
JustinCredible

Reputation: 165

Mysql add an index on a json column which contains an array

I would like to add an index to a json column which contains a json array that looks like this:

[{"points": 3.2, "captain": false, "leagueId": 1078}, {"points": 3.2, "captain": false, "leagueId": 1082}, {"points": 3.2, "captain": false, "leagueId": 1084}]

The index that I want to create should be on the leagueId. Would that be possible?

The MySQL version I'm using is 8.0.26.

Thanks in advance!

Upvotes: 0

Views: 177

Answers (0)

Related Questions