[jQuery] Jquery and function(json)

[jQuery] Jquery and function(json)


Hello,
so today I started with jquery and wow :D I have one question
regarding json. I found this topic (I'm sorry if linking isn't
allowed)
http://www.designerstalk.com/forums/programming/29651-jquery-ajax-question.html
I want something similar:
...
success: function(json){
if( json.success == "true" ) {
} else {
if(json.error == "1") {
} ....
but it's doesn't want to work with my script. Now is jquery.js
(latest) enough or must I include special addons? Or this works and my
php file isn't right; any info how to set error to be equal to 1?
Thanks for help!