你好!
OK, you showed only the result of EXPLAIN, so it wasn't clear to me that the actual SELECT results were different. I see now that they are, and I don't think that's right.
My understanding is that the EXPLAIN output can be different, but the result of the SELECT should be the same.
I also note that
SELECT c FROM jemp WHERE g=1 gives the same result with or without the index.
The examples in the Manual (e.g. at
https://dev.mysql.com/doc/refman/8.0/en/create-table-secondary-indexes.html#json-column-indirect-index) were copied directly from a MySQL client session and so were correct when they were written. If some behaviour has changed since that time, it would be very good to know about it.
I think you may have found a bug. Please file a bug report at
https://bugs.mysql.com/ so our support and development staff can have a look at it. (If this is an issue with the documentation, they'll confirm this and we'll fix it.)
Thanks!
Jon Stephens
MySQL Documentation Team @ Oracle
MySQL Dev Zone
MySQL Server Documentation
Oracle